build(deps): update docker/login-action action to v3.4.0 #2177
This file contains 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
on: | |
- push | |
- pull_request | |
- workflow_call | |
name: Continuous integration | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Run cargo check | |
run: cargo check | |
version-check: | |
name: Check Cargo.toml version | |
if: github.ref_type == 'tag' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download source code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Check cargo file version | |
run: | | |
CARGO_VERSION=$(sed -n 's,^version\s*= \"\(.*\)\",\1,p' Cargo.toml) | |
TAG_VERSION=$(echo ${{ github.ref_name }} | sed 's/v//') | |
if [ "$CARGO_VERSION" != "$TAG_VERSION" ];then | |
echo "::error title=Invalid Cargo.toml version::Cargo.toml version does not match the tag version" | |
exit 1 | |
fi | |
unit-tests: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Run unit-tests coverage | |
run: make unit-tests | |
integration-tests: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Run integration-tests coverage | |
run: make integration-tests | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Run Rust format check | |
run: make fmt | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Run Clippy | |
run: make lint | |
spelling: | |
name: Spell Check with Typos | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Actions Repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Spell Check Repo | |
uses: crate-ci/typos@7bc041cbb7ca9167c9e0e4ccbb26f48eb0f9d4e0 # v1.30.2 | |
coverage: | |
name: coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: kubewarden/github-actions/tarpaulin-install@36f0782e949d8597c061ca0d519f7e17a2813190 # v3.4.8 | |
- name: Generate unit-tests coverage | |
run: make coverage-unit-tests | |
- name: Upload unit-tests coverage to Codecov | |
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
with: | |
name: unit-tests | |
directory: coverage/unit-tests | |
flags: unit-tests | |
verbose: true | |
- name: Generate integration-tests coverage | |
run: make coverage-integration-tests | |
- name: Upload integration-tests coverage to Codecov | |
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
with: | |
name: integration-tests | |
directory: coverage/integration-tests | |
flags: integration-tests | |
verbose: true | |
- name: Upload OTEL integration-tests coverage to Codecov | |
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} | |
with: | |
name: otel-integration-tests | |
directory: coverage/otel-integration-tests | |
flags: integration-tests | |
verbose: true | |
docs: | |
name: Update documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- run: | | |
make build-docs | |
if ! git diff --quiet cli-docs.md; then | |
echo "Changes detected in cli-docs.md. Please run `make build-docs` and commit the changes." | |
gh run cancel ${{ github.run_id }} | |
fi |