-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (62 loc) · 1.58 KB
/
test.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
---
name: Tests
on: # yamllint disable-line rule:truthy
push:
paths-ignore:
- "*.md"
- ".github/dependabot.yaml"
- ".editorconfig"
- ".eslintignore"
- ".eslintrc.yaml"
- ".gitignore"
- ".markdownlint.yaml"
- ".prettierrc.yaml"
- "LICENSE"
- ".yamllint.yaml"
pull_request:
branches:
- main
paths-ignore:
- "*.md"
- ".github/dependabot.yaml"
- ".editorconfig"
- ".eslintignore"
- ".eslintrc.yaml"
- ".gitignore"
- ".markdownlint.yaml"
- ".prettierrc.yaml"
- "LICENSE"
- ".yamllint.yaml"
jobs:
test:
name: Test
runs-on: ubuntu-22.04
strategy:
matrix:
browser: [Chrome, Opera]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ">=22.0.0"
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Security Audit
run: npm audit
- name: Test
run: |
if [ "${{ matrix.browser }}" = "Chrome" ]; then
echo "Testing on Chrome browser"
npm t
else
echo "Testing on Opera browser"
sudo sh -c 'echo "deb http://deb.opera.com/opera/ stable non-free" >> /etc/apt/sources.list.d/opera.list'
sudo sh -c 'wget -O - http://deb.opera.com/archive.key | apt-key add -'
sudo apt-get update -y
sudo apt-get install opera-stable -y
export VITE_BROWSER_PATH=/usr/bin/opera
npm t
fi