Skip to content

feat: add CI workflow + migrate to MIT/Apache-2.0 dual license #9

feat: add CI workflow + migrate to MIT/Apache-2.0 dual license

feat: add CI workflow + migrate to MIT/Apache-2.0 dual license #9

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2
- run: cargo fmt --check
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo build --all-features
- run: cargo test --all-features
security:
name: Snyk Security
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: snyk/actions/setup@8e119fbb6c251787721d34ba683ed48eba792766 # master
- name: Run Snyk Open Source (SCA) test
run: snyk test --file=Cargo.toml --severity-threshold=high
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Run Snyk Code (SAST) test
run: snyk code test --severity-threshold=high
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}