Merge pull request #310 from vuittont60/main #538
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
name: Coverage | |
on: [push] | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
services: | |
redis: | |
image: redis | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: hecrj/setup-rust-action@v1 | |
- | |
name: Free disk space | |
run: | | |
sudo docker rmi $(docker image ls -aq) || true | |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc || true | |
- name: Run code coverage | |
run: | | |
cargo xtask generate-code-coverage-report --install-dependencies | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY_SECRET }} | |
S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }} | |
COMMERCE_POSTGRESQL_URL: postgres://postgres:postgres@localhost/postgres | |
UPDATE_COMPATIBILITY: true | |
RUST_BACKTRACE: 1 | |
- name: Deploy | |
uses: khonsulabs/sync-to-dossier@main | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/') | |
with: | |
url: ${{ secrets.DOSSIER_URL }} | |
api-key-id: ${{ secrets.DOSSIER_API_KEY_ID }} | |
api-key: ${{ secrets.DOSSIER_API_KEY }} | |
project: bonsaidb | |
from: coverage/ | |
to: /${{ github.ref_name }}/coverage |