-
-
Notifications
You must be signed in to change notification settings - Fork 8
66 lines (60 loc) · 2.02 KB
/
tests.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
61
62
63
64
65
66
name: Run Checks
on:
push:
branches:
- main
pull_request: {}
merge_group:
jobs:
checks:
name: Run Checks
env:
BINSTALL_VERSION: 1.8.0
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4.2.2
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
if: matrix.os == 'ubuntu-latest'
with:
node-version: 20
cache: 'npm'
cache-dependency-path: docs/package-lock.json
- name: Install cargo-binstall
if: matrix.os == 'ubuntu-latest'
run: |
gh release download "v${BINSTALL_VERSION}" --repo "cargo-bins/cargo-binstall" --pattern "cargo-binstall-x86_64-unknown-linux-musl.tgz"
tar -xvf cargo-binstall-x86_64-unknown-linux-musl.tgz
cp cargo-binstall $HOME/.cargo/bin
env:
GH_TOKEN: ${{ github.token }}
- name: Install cargo-binstall
if: matrix.os == 'windows-latest'
run: |
gh release download "v${{ env.BINSTALL_VERSION }}" --repo "cargo-bins/cargo-binstall" --pattern "cargo-binstall-x86_64-pc-windows-msvc.zip"
unzip cargo-binstall-x86_64-pc-windows-msvc.zip
cp cargo-binstall.exe $HOME/.cargo/bin
env:
GH_TOKEN: ${{ github.token }}
- name: Install nightly toolchain (for formatting)
if: matrix.os == 'ubuntu-latest'
run: rustup toolchain install nightly --component rustfmt
- name: Install Just
run: cargo-binstall --no-confirm just --force
- name: Run CI
if: matrix.os == 'ubuntu-latest'
run: just binstall_args="--force" install-all-dependencies ci
- name: Run tests only
if: matrix.os == 'windows-latest'
run: just test
vale:
name: Vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: errata-ai/vale-action@reviewdog
with:
files: '["docs", "README.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md"]'