-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* switch to dtolnay/rust-toolchain, use llvm-cov instead of tarpaulin
- Loading branch information
Showing
1 changed file
with
16 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,15 +16,12 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
|
||
- name: Check format | ||
run: | | ||
cargo fmt -- --check | ||
run: cargo fmt --check | ||
|
||
Linting: | ||
runs-on: ubuntu-latest | ||
|
@@ -35,19 +32,15 @@ jobs: | |
lfs: true | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: clippy | ||
|
||
- name: Lint with clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
run: cargo clippy --no-deps # --all-targets --all-features | ||
|
||
Testing: | ||
needs: Formatting | ||
needs: [Formatting, Linting] | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
|
@@ -79,6 +72,9 @@ jobs: | |
with: | ||
lfs: 'true' | ||
|
||
- name: Install host libraries | ||
run: sudo apt-get install -y libsqlite3-dev libsqlite3-0 | ||
|
||
- name: Import test database. | ||
run: | | ||
set -euo pipefail | ||
|
@@ -89,18 +85,17 @@ jobs: | |
PGPASSWORD: uta_admin | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: llvm-tools-preview # needed for cargo llvm-cov | ||
|
||
- uses: Swatinem/[email protected] | ||
|
||
- name: Run cargo-tarpaulin with fast tests | ||
uses: actions-rs/[email protected] | ||
with: | ||
version: 0.21.0 | ||
args: "-- --test-threads 1" | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Run cargo-llvm-cov with fast tests | ||
run: cargo llvm-cov --lcov --output-path lcov.info -- --test-threads 1 | ||
env: | ||
TEST_UTA_DATABASE_URL: postgres://uta_admin:[email protected]/uta | ||
TEST_UTA_DATABASE_SCHEMA: uta_20210129 | ||
|
@@ -109,10 +104,7 @@ jobs: | |
if: ${{ matrix.label == 'fast' }} | ||
|
||
- name: Run cargo-test with full tests | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: "--release -- --include-ignored" | ||
run: "cargo test --release -- --include-ignored" | ||
env: | ||
TEST_UTA_DATABASE_URL: postgres://uta_admin:[email protected]/uta | ||
TEST_UTA_DATABASE_SCHEMA: uta_20210129 | ||
|