diff options
Diffstat (limited to '.github/workflows')
-rwxr-xr-x | .github/workflows/audit.yml | 14 | ||||
-rwxr-xr-x | .github/workflows/ci.yaml | 54 |
2 files changed, 68 insertions, 0 deletions
diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100755 index 0000000..118008c --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,14 @@ +name: Security audit +on: + push: + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' +jobs: + security_audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100755 index 0000000..2c39904 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,54 @@ +on: + push: + branches: + - master + pull_request: + branches: + - master + +name: tests + +jobs: + ci: + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - beta + - nightly + - 1.46.0 # MSRV + + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: ${{ matrix.rust }} + override: true + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v1 + + - uses: actions-rs/cargo@v1 + with: + command: build + args: --features stable + + - uses: actions-rs/cargo@v1 + with: + command: test + args: --features stable + + - uses: actions-rs/cargo@v1 + if: ${{ matrix.rust == 'stable' }} + with: + command: fmt + args: --all -- --check + + - uses: actions-rs/cargo@v1 + if: ${{ matrix.rust != '1.40.0' }} # 1.40 has horrible lints. + with: + command: clippy + args: -- -D warnings |