Skip to content

Commit 5994430

Browse files
authored
Merge pull request #3 from zcash/ci
CI overhaul
2 parents 5a58a42 + 3bd0ebb commit 5994430

File tree

4 files changed

+1055
-37
lines changed

4 files changed

+1055
-37
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,8 @@ name: CI
22
on: [push, pull_request]
33

44
jobs:
5-
lint:
6-
runs-on: ubuntu-latest
7-
steps:
8-
- uses: actions/checkout@v3
9-
- uses: actions-rs/toolchain@v1
10-
with:
11-
profile: minimal
12-
toolchain: nightly
13-
components: rustfmt, clippy
14-
override: true
15-
- uses: Swatinem/rust-cache@v1
16-
- run: cargo clippy --all-features -- -D warnings
17-
- run: cargo fmt -- --check
18-
19-
semver-checks:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions-rs/toolchain@v1
24-
with:
25-
toolchain: stable
26-
profile: minimal
27-
- name: Run cargo-semver-checks
28-
shell: bash
29-
run: |
30-
export CARGO_TERM_COLOR=always
31-
cargo install cargo-semver-checks --locked
32-
cargo semver-checks check-release
33-
345
test:
6+
name: Test ${{ matrix.rust }} on ${{ matrix.os }}
357
runs-on: ${{ matrix.os }}
368
services:
379
postgres:
@@ -49,15 +21,38 @@ jobs:
4921
matrix:
5022
os: [ubuntu-latest]
5123
rust:
24+
- MSRV
5225
- stable
53-
- 1.59
5426
steps:
55-
- uses: actions/checkout@v3
56-
- uses: actions-rs/toolchain@v1
57-
with:
58-
toolchain: ${{ matrix.rust }}
59-
profile: minimal
60-
override: true
27+
- uses: actions/checkout@v4
28+
29+
# If testing stable Rust, do so with the latest dependencies.
30+
- uses: dtolnay/rust-toolchain@stable
31+
id: toolchain
32+
if: matrix.rust == 'stable'
33+
- run: rustup override set ${{steps.toolchain.outputs.name}}
34+
if: matrix.rust == 'stable'
35+
- name: Remove lockfile to build with latest dependencies
36+
run: rm Cargo.lock
37+
if: matrix.rust == 'stable'
38+
6139
- uses: Swatinem/rust-cache@v1
6240
- run: cargo build --tests
6341
- run: cargo test -- --nocapture --quiet
42+
43+
clippy-msrv:
44+
name: Clippy (MSRV)
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: Swatinem/rust-cache@v1
49+
- run: cargo clippy --all-features -- -D warnings
50+
- run: cargo fmt -- --check
51+
52+
fmt:
53+
name: Rustfmt
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
- name: Check formatting
58+
run: cargo fmt --all -- --check

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
/target/
33
**/target/
44
**/*.rs.bk
5-
Cargo.lock
65
*.sublime*

0 commit comments

Comments
 (0)