-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (66 loc) · 2.03 KB
/
test-on-pr.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
name: Test on PR
on: [pull_request]
jobs:
test-tauri:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: 🧩 Setup dependencies (linux)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update -y
sudo apt update -y
sudo apt-get install -y libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
- name: 🗄️ Setup Rust cache
uses: actions/cache@v2
with:
key: ${{ matrix.platform }}-${{ hashFiles('src-tauri/Cargo.lock') }}
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git
./src-tauri/target
- name: 🍃 Install Node.js
uses: actions/setup-node@v2
with:
node-version: 18
cache: yarn
cache-dependency-path: |
yarn.lock
- name: 🦀 Install Rust
uses: actions-rs/toolchain@v1
with: { toolchain: stable }
- name: 🔌 Install Node.js frontend dependencies
run: |
yarn config set network-timeout 300000
yarn install
- name: 🧹 Eslint application
run: |
yarn lint
- name: 🧹 Prettier application
if: matrix.os == 'ubuntu-latest' #Prettier temporarily disabled for windows
run: |
yarn prettier
- name: 🧪 Test application (linux)
if: matrix.os == 'ubuntu-latest'
continue-on-error: true
run: |
xvfb-run yarn test
- name: 🧪 Test application (non-linux)
if: matrix.os != 'ubuntu-latest'
continue-on-error: true
run: |
yarn test