-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (48 loc) · 1.48 KB
/
Copy pathunit-tests.yml
File metadata and controls
64 lines (48 loc) · 1.48 KB
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
name: unit-tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
js_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run JavaScript tests
run: npm test
korppi_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v5
- name: Silence nix-channel warning
run: mkdir -p ~/.nix-defexpr/channels
- uses: cachix/install-nix-action@v31
- uses: cachix/cachix-action@v15
with:
name: rstats-on-nix
authToken: ${{ secrets.CACHIX_AUTH }}
- name: Build dev shell
run: |
export CARGO_BUILD_JOBS=1
export RUSTFLAGS="-C debuginfo=0 -C opt-level=0"
SYSTEM=$([ "${{ runner.os }}" = "macOS" ] && echo "aarch64-darwin" || echo "x86_64-linux")
nix build .#devShells.${SYSTEM}.default
- name: Run unit tests
run: |
export CARGO_BUILD_JOBS=1
export RUSTFLAGS="-C debuginfo=0 -C opt-level=0"
SYSTEM=$([ "${{ runner.os }}" = "macOS" ] && echo "aarch64-darwin" || echo "x86_64-linux")
nix develop .#devShells.${SYSTEM}.default --command bash -c "cd src-tauri && cargo test --all-features"