Define and test an MSRV
This commit is contained in:
@@ -8,8 +8,9 @@ on:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
name: "Clippy"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
@@ -26,37 +27,10 @@ jobs:
|
||||
path: target
|
||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- uses: actions-rs/cargo@v1.0.1
|
||||
with:
|
||||
command: check
|
||||
|
||||
- name: test
|
||||
run: cargo test
|
||||
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- run: rustup component add clippy
|
||||
|
||||
- uses: actions-rs/clippy-check@v1
|
||||
@@ -66,6 +40,7 @@ jobs:
|
||||
|
||||
mdbook:
|
||||
runs-on: ubuntu-latest
|
||||
name: "Documentation"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
43
.github/workflows/tests.yml
vendored
Normal file
43
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: taskchampion
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
- "1.47" # MSRV
|
||||
- "stable"
|
||||
|
||||
name: "Test - Rust ${{ matrix.rust }}"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Cache cargo registry
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cargo/registry
|
||||
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Cache cargo build
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: target
|
||||
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: "${{ matrix.rust }}"
|
||||
override: true
|
||||
|
||||
- name: test
|
||||
run: cargo test
|
||||
Reference in New Issue
Block a user