Skip to content

Commit

Permalink
Update GHA configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pfmooney committed Jun 14, 2023
1 parent 505ac98 commit 1dafade
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/cargo-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: CI
on: [push, pull_request]

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: cargo test
Expand All @@ -18,34 +21,24 @@ jobs:
rust: stable-x86_64-gnu
steps:
- name: Checkout sources
uses: actions/checkout@v1
uses: actions/checkout@v3

- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
override: true

- name: Generate lock file
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
run: cargo generate-lockfile

# cfg-if 0.1.10 does not support rust 1.21.0, so downgrade it to the last
# known working version after generating the lockfile above
- name: Downgrade dependencies
uses: actions-rs/cargo@v1
with:
command: update
args: -p cfg-if --precise 0.1.9
if: matrix.rust == '1.21.0'
run: cargo update -p cfg-if --precise 0.1.9

- name: Run `cargo check`
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check

- name: Run `cargo test`
uses: actions-rs/cargo@v1
with:
command: test
run: cargo check

0 comments on commit 1dafade

Please sign in to comment.