Skip to content

Use map folder_name directly instead of filename (#19) #106

Use map folder_name directly instead of filename (#19)

Use map folder_name directly instead of filename (#19) #106

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build_and_test:
runs-on: ubuntu-latest
env:
DB_HOST: localhost
DB_PORT: 3306
DATABASE_URL: "mysql://root:banana@127.0.0.1:3306/faf"
steps:
- uses: actions/checkout@v6
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v1
- name: "Initialize faf db"
run: docker compose up -d --quiet-pull
- run: ./test/clear_and_populate_db.sh -h 127.0.0.1 -P $DB_PORT --user=root --password=banana faf
- uses: actions-rs/cargo@v1
with:
command: test
args: --features local_db_tests
- name: "Run tests that need separate processes"
run: timeout 30 ./test/run_process_tests.sh
- name: Generate code coverage
run: cargo llvm-cov --features local_db_tests --lcov --output-path lcov.info --ignore-filename-regex '.*rustlib.*'
- name: Report coverage
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true