diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8ea16d..109a1e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,82 +9,44 @@ on: env: CARGO_TERM_COLOR: always -# Copied from sqlx -# TODO: switch from the unmaintained actions-rs to something else jobs: format: name: Format runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - # this is cheaper than requesting the non-minimal profile + - uses: moonrepo/setup-rust@v1 - run: rustup component add rustfmt - - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all -- --check check: name: Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - uses: actions-rs/cargo@v1 - with: - command: check - args: > - --all-features --workspace + - uses: moonrepo/setup-rust@v1 + - run: cargo check --all-features --workspace test: - name: Tests + name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - - uses: actions-rs/cargo@v1 - with: - command: test - args: > - --all-features --workspace -- --test-threads=1 - + - uses: moonrepo/setup-rust@v1 + - run: cargo test --all-features --workspace -- --test-threads=1 coverage: + name: Coverage runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - + - uses: moonrepo/setup-rust@v1 - uses: taiki-e/install-action@cargo-llvm-cov - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: + fail_ci_if_error: true files: lcov.info - fail_ci_if_error: true \ No newline at end of file + token: ${{ secrets.CODECOV_TOKEN }} # required