Use map folder_name directly instead of filename (#19) #106
This file contains hidden or 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: 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 |