diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c7e363b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +# limit ci building to pushes to master not to get twice the notification email +# from github. +on: + workflow_dispatch: + push: + branches: + - 'master' + pull_request: + branches: '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install rust toolchain + uses: hecrj/setup-rust-action@v1.3.4 + with: + rust-version: stable + components: clippy, rustfmt + + - name: Cache + uses: Swatinem/rust-cache@v1 + + - name: Build + run: cargo build --all-features --all-targets + + - name: Cargo fmt + continue-on-error: true + run: cargo fmt --all -- --check + + - name: Cargo clippy + continue-on-error: true + run: cargo clippy --all-targets --all-features -- -D warnings + + - name: Test + run: timeout 15m cargo test --all --all-features diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f5fbebc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: rust - -matrix: - include: - - rust: stable - - rust: beta - - rust: nightly - -script: - - | - cargo build --all && cargo test --all diff --git a/CHANGELOG.md b/CHANGELOG.md index 902aa0e..dffacdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next * documentation changes + * migrate from travis to github actions [#5](https://github.com/koivunej/derive-into-owned/pull/5) ## 0.1.0