Skip to content

chore(deps): update docker.io/amazon/aws-cli docker digest to 3f29edb #226

chore(deps): update docker.io/amazon/aws-cli docker digest to 3f29edb

chore(deps): update docker.io/amazon/aws-cli docker digest to 3f29edb #226

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
SQLX_OFFLINE: "true"
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2
with:
save-if: ${{ github.ref == 'refs/head/main' }}
shared-key: "main"
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run unit tests
run: cargo llvm-cov test --verbose --lib --lcov --output-path lcov.unit-tests.info
- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
with:
name: lcov.unit-tests.info
path: lcov.unit-tests.info
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2
with:
save-if: ${{ github.ref == 'refs/head/main' }}
shared-key: "main"
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Start containers
run: docker compose up -d
- name: Install self signed certificate
run: |
until [ -f ./resources/test/certs/cert.pem ]; do sleep 1; done
sudo cp ./resources/test/certs/cert.pem /usr/local/share/ca-certificates/localhost.crt && sudo update-ca-certificates
timeout-minutes: 1
- name: Run integration tests
run: cargo llvm-cov test --verbose --test '*' --lcov --output-path lcov.integration-tests.info
env:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
AWS_REGION: us-east-1
RUSTFLAGS: "-C instrument-coverage"
- name: Stop containers
if: always()
run: docker compose down
- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
with:
name: lcov.integration-tests.info
path: lcov.integration-tests.info
coverage:
runs-on: ubuntu-latest
permissions:
pull-requests: write
needs: [unit-tests, integration-tests]
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@f5da1b26b0dcf5d893077a3c4f29cf78079c841d # v1
- uses: actions/download-artifact@master
with:
name: lcov.integration-tests.info
path: lcov
- uses: actions/download-artifact@master
with:
name: lcov.unit-tests.info
path: lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.unit-tests.info,lcov.integration-tests.info
fail_ci_if_error: true
build-release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Build final release binary
run: ./scripts/release
- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
with:
name: terrashine-binary
path: target/release/terrashine