-
-
Notifications
You must be signed in to change notification settings - Fork 5
92 lines (77 loc) · 2.42 KB
/
tests.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: 'Tests on PR'
on: [pull_request]
jobs:
js-build-pretier:
name: Check build & Prettier
runs-on: ubuntu-latest
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules-v1
with:
path: |
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Yarn install
run: yarn --prefer-offline --frozen-lockfile install
- name: Check JS build
run: yarn build
- name: Run prettier
run: |
yarn lint:prettier
test-tauri:
name: Test Tauri build
runs-on: windows-latest
concurrency:
group: tests-tauri-build-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache node modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules-v1
with:
path: |
node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
- name: Yarn install FE dependencies
run: yarn --prefer-offline --frozen-lockfile install
- name: Build tauri App
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
- name: Run Rust tests
run: |
cd src-tauri
cargo test --package coh3-stats-desktop-app --lib
- name: Upload Tauri app artifacts
uses: actions/upload-artifact@v4
with:
name: coh3-stats-desktop-app
path: src-tauri/target/release/bundle/*