diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 000000000..81de4fb21 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,73 @@ +name: CI + +on: + push: + branches: ['master', '0.5.x'] + pull_request: + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + rust: [stable, beta] + exclude: + - os: macos-latest + rust: beta + - os: windows-latest + rust: beta + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + - uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --all-targets + - uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt, clippy + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - uses: actions-rs/cargo@v1 + if: always() + with: + command: clippy + args: --workspace --all-targets -- -D warnings + + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + - uses: actions-rs/tarpaulin@v0.1 + - uses: codecov/codecov-action@v1.0.2 + with: + token: ${{secrets.CODECOV_TOKEN}} + - uses: actions/upload-artifact@v1 + with: + name: code-coverage-report + path: cobertura.xml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index b1c2d9741..000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,15 +0,0 @@ -stages: - - template: azure/stages.yml@templates - parameters: - benches: true - minrust: false - codecov_token: $(CODECOV_TOKEN_SECRET) - test_ignored: true - nightly_coverage: true - -resources: - repositories: - - repository: templates - type: github - name: crate-ci/azure-pipelines - endpoint: djc