Skip to content

update dependencies #31

update dependencies

update dependencies #31

Workflow file for this run

name: test coverage
on:
push:
branches: ["main"]
jobs:
test_coverage:
name: test coverage
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: username
POSTGRES_PASSWORD: password
POSTGRES_DB: database_name
ports:
- 5432:5432
redis:
image: redis:latest
ports:
- 6379:6379
mailhog:
image: mailhog/mailhog:latest
ports:
- 1025:1025
- 8025:8025
mockserver:
image: mockserver/mockserver:latest
env:
MOCKSERVER_LOG_LEVEL: DEBUG
SERVER_PORT: 8026
ports:
- 8026:8026
env:
APP_PROFILE: test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Cache tarpaulin
uses: actions/cache@v4
id: cache-tarpaulin
with:
path: |
~/.cargo/bin/cargo-tarpaulin
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Install tarpaulin
if: ${{ steps.cache-tarpaulin.outputs.cache-hit != 'true' }}
continue-on-error: true
uses: actions-rs/cargo@v1
with:
command: install
args: >
cargo-tarpaulin
- name: Migrate database
run: |
./scripts/init_db.sh
- name: Add mockserver expections
run: |
./scripts/init_mockserver.sh
- name: Checkout repository
uses: actions/checkout@v4
- name: Generate code coverage
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
#token: ${{secrets.CODECOV_TOKEN}} # not required for public repos
fail_ci_if_error: true