-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1.08 KB
/
test.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
on: [push, pull_request]
name: Test
# TODO: Run for all crates
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# TODO: Centralize this data
target: [x86_64-unknown-linux-gnu]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- name: Verify versions
run: rustc --version && rustup --version && cargo --version
- name: Cache build context
id: cache-cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.target }}-cargo
- name: Test on ${{ matrix.target }}
working-directory: ./src/orangutan-server
run: cargo test
# TODO: Only check code style for one target
- name: Check code style
working-directory: ./src/orangutan-server
run: cargo fmt -- --check