Merge pull request #219 from DefGuard/release_1.6_merger #592
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test backend | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| - 'release/**' | |
| paths-ignore: | |
| - "*.md" | |
| - "LICENSE" | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| - 'release/**' | |
| paths-ignore: | |
| - "*.md" | |
| - "LICENSE" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| runs-on: | |
| - codebuild-defguard-proxy-runner-${{ github.run_id }}-${{ github.run_attempt }} | |
| container: public.ecr.aws/docker/library/rust:1 | |
| steps: | |
| - name: Debug | |
| run: echo ${{ github.ref_name }} | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Scan code with Trivy | |
| uses: aquasecurity/trivy-action@0.33.1 | |
| with: | |
| scan-type: 'fs' | |
| scan-ref: '.' | |
| exit-code: "1" | |
| ignore-unfixed: true | |
| severity: "CRITICAL,HIGH,MEDIUM" | |
| scanners: "vuln" | |
| - name: Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install protoc | |
| run: apt-get update && apt-get -y install protobuf-compiler | |
| - name: Check format | |
| run: | | |
| rustup component add rustfmt | |
| cargo fmt -- --check | |
| - name: Run clippy linter | |
| run: | | |
| rustup component add clippy | |
| cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Run cargo deny | |
| run: | | |
| cargo install cargo-deny | |
| cargo deny check | |
| - name: Run tests | |
| run: cargo test --locked --no-fail-fast |