-
Notifications
You must be signed in to change notification settings - Fork 4
60 lines (51 loc) · 1.51 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
48
49
50
51
52
53
54
55
56
57
58
59
name: Test
on:
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# TODO: https://github.com/rivet-gg/cli/issues/211
# os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.05
- name: Install Docker
if: startsWith(matrix.os, 'macos-')
run: |
brew install docker
colima start
- name: Cache Cargo dependencies
uses: actions/cache@v2
timeout-minutes: 10
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run cargo fmt
run: |
nix-shell --run "
cargo fmt --check --manifest-path rivet-toolchain-ffi/Cargo.toml &&
cargo fmt --check --manifest-path rivet-cli/Cargo.toml
"
- name: Run cargo test
env:
RIVET_API_ENDPOINT: ${{ secrets.RIVET_API_ENDPOINT }}
RIVET_TOKEN: ${{ secrets.RIVET_TOKEN }}
RUST_BACKTRACE: 1
CARGO_PROFILE_TEST_BUILD_OVERRIDE_DEBUG: true
run: |
nix-shell --run "cargo test"