chore(deps): update denoland/deno docker tag to distroless-2.6.9 #3649
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: Tests and code quality | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - renovate/** | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| pre_job: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
| steps: | |
| - id: skip_check | |
| uses: fkirc/skip-duplicate-actions@v5 | |
| with: | |
| concurrent_skipping: same_content | |
| do_not_skip: '["pull_request", "release", "workflow_dispatch", "schedule"]' | |
| skip_after_successful_duplicate: true | |
| tests: | |
| name: Code quality, unit tests and code coverage | |
| runs-on: ubuntu-latest | |
| needs: pre_job | |
| if: needs.pre_job.outputs.should_skip != 'true' | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| SCCACHE_GHA_ENABLED: "true" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Get Rust version from Dockerfile | |
| id: get-rust-version | |
| run: | | |
| echo "RUST_VERSION=$(grep -oP 'FROM .* rust:\K[\d.]+' Dockerfile)" \ | |
| >> $GITHUB_OUTPUT | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ steps.get-rust-version.outputs.RUST_VERSION }} | |
| components: rustfmt, clippy, llvm-tools-preview | |
| - name: Setup sccache | |
| uses: mozilla-actions/[email protected] | |
| - name: Run cargo fmt | |
| run: cargo fmt --all -- --check | |
| - name: Lint code with Clippy | |
| run: cargo clippy -- -D warnings | |
| - name: Install grcov | |
| run: cargo install grcov | |
| - name: Run unit tests | |
| run: cargo test | |
| env: | |
| RUSTFLAGS: -Cinstrument-coverage | |
| LLVM_PROFILE_FILE: coverage-%p-%m.profraw | |
| - name: Generate coverage report | |
| run: | | |
| grcov $(find . -name "coverage-*.profraw" -print) \ | |
| --binary-path ./target/debug/ \ | |
| --branch \ | |
| --ignore "/*" \ | |
| --ignore-not-existing \ | |
| --output-path lcov.info \ | |
| --output-type lcov \ | |
| --source-dir . | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| files: lcov.info | |
| flags: unittests | |
| integration: | |
| name: Integration tests | |
| runs-on: ubuntu-latest | |
| needs: pre_job | |
| if: needs.pre_job.outputs.should_skip != 'true' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Lint Dockerfile | |
| uses: hadolint/[email protected] | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Run integration tests | |
| run: ./smoke_test.sh --log-file ${{ runner.temp }}/integration_tests.log | |
| working-directory: integration | |
| - name: Print service logs | |
| if: ${{ !cancelled() }} | |
| run: cat ${{ runner.temp }}/integration_tests.log |