-
Notifications
You must be signed in to change notification settings - Fork 14
60 lines (55 loc) · 1.36 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: CI
on:
pull_request:
push:
branches: ['master']
schedule:
- cron: '36 3 * * 6' # every Saturday morning
env:
CARGO_UNSTABLE_SPARSE_REGISTRY: 'true'
defaults:
run:
shell: bash
jobs:
test:
name: Test Suite
strategy:
matrix:
rust:
- nightly
# Check a ~3 months old nightly as "oldest supported version"
- nightly-2023-10-01
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Clear lockfiles (cron jobs only)
if: github.event_name == 'schedule'
# macOS `find` requires the `.`
run: |
for C in $(find . -name Cargo.lock); do
echo "Updating $C"
cargo update --manifest-path $(dirname "$C")/Cargo.toml
done
- name: Run tests
working-directory: test
run: ./ci.sh
check:
name: Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.75.0
components: rustfmt, clippy
- name: rustfmt
run: cargo fmt --check
- name: clippy
run: cargo clippy -- -D warnings