Skip to content

Commit

Permalink
CI: update configs (#14)
Browse files Browse the repository at this point in the history
* CI config updates

* fix lint

* bump MSRV to 1.56

* nix: use flakes

* update criterion

* bump msrv to 1.63.0

* Update quickcheck for new API

* fmt

* fix license

* simplify flake
  • Loading branch information
luizirber authored Jul 12, 2024
1 parent 4ea2e8f commit 660e0d2
Show file tree
Hide file tree
Showing 16 changed files with 1,012 additions and 297 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
39 changes: 14 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,46 +89,35 @@ jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
toolchain: stable
override: true

- name: Get Rust Version
id: rust-version
run: echo "::set-output name=version::$(cargo -V | head -n1 | awk '{print $2}')"

- name: Get Tarpaulin Version
id: tarpaulin-version
run: echo "::set-output name=version::$(wget -qO- 'https://api.github.com/repos/xd009642/tarpaulin/releases/latest' | jq -r '.tag_name')"

- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/cargo-tarpaulin
~/.cargo/git
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ steps.rust-version.outputs.version }}-tarpaulin-${{ steps.tarpaulin-version.outputs.version }} }}

- name: Install Tarpaulin
- name: Install cargo-binstall
run: |
test -e ~/.cargo/bin/cargo-tarpaulin || cargo install cargo-tarpaulin --version ${{ steps.tarpaulin-version.outputs.version }}
wget https://github.com/ryankurte/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-gnu.tgz
tar xf cargo-binstall-x86_64-unknown-linux-gnu.tgz
chmod +x cargo-binstall
mv cargo-binstall "$HOME/.cargo/bin"
- name: Install cargo-tarpaulin
run: cargo binstall --no-confirm cargo-tarpaulin

- name: Run cargo-tarpaulin
run: cargo tarpaulin --timeout 600 --out Xml -- --test-threads 1

- name: Upload coverage to codecov
uses: codecov/codecov-action@v1.0.3
uses: codecov/codecov-action@v3

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -156,11 +145,11 @@ jobs:
- uses: actions/checkout@v2

- name: check if README matches MSRV defined here
run: grep '1.37.0' README.md
run: grep '1.63.0' README.md

- uses: actions-rs/toolchain@v1
with:
toolchain: 1.37.0
toolchain: 1.63.0
override: true

- name: Check if it builds
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/target
**/*.rs.bk
Cargo.lock
/result
/result-lib
.direnv
Loading

0 comments on commit 660e0d2

Please sign in to comment.