-
Notifications
You must be signed in to change notification settings - Fork 99
123 lines (110 loc) · 3.1 KB
/
Copy pathtest.yml
File metadata and controls
123 lines (110 loc) · 3.1 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
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Test
run-name: Test the project
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
NODE_VERSION: 24
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
browser:
- electron
# - chrome
# - firefox
# - webkit
# - chromium
# exclude:
# - os: macos-latest
# browser: chromium
include:
- os: ubuntu-latest
name: Linux
- os: macos-latest
name: macOS
- os: windows-latest
name: Windows
name: ${{ matrix.name }} - ${{ matrix.browser }}
runs-on: ${{ matrix.os }}
continue-on-error: false
steps:
- name: Setup firefox (macOS)
if: matrix.os == 'macos-latest' && matrix.browser == 'firefox'
uses: browser-actions/setup-firefox@v1
- uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- uses: leanprover/lean-action@v1
with:
build: true
test: true
lint: false
use-github-cache: false
use-mathlib-cache: false
check-reservoir-eligibility: false
lake-package-directory: "server"
- run: elan default stable
- name: Build the project
run: |
npm install
npm run build
npm run build:test
- name: Run Cypress tests (Development mode)
run: npm run test
- name: Upload Cypress screenshots
if: failure()
uses: actions/upload-artifact@v6
with:
name: "cypress-screenshots-${{ matrix.name }}-${{ matrix.browser }}"
path: cypress/screenshots
retention-days: 2
if-no-files-found: ignore
- name: Install Bubblewrap
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install bubblewrap
- name: Configure AppArmor for Bubblewrap (https://etbe.coker.com.au/2024/04/24/ubuntu-24-04-bubblewrap/)
if: matrix.os == 'ubuntu-latest'
run: |
sudo tee /etc/apparmor.d/bwrap > /dev/null << 'EOF'
abi <abi/4.0>,
include <tunables/global>
profile bwrap /usr/bin/bwrap flags=(unconfined) {
userns,
# Site-specific additions and overrides. See local/README for details.
include if exists <local/bwrap>
}
EOF
sudo systemctl reload apparmor
- name: Run Cypress tests (Production mode)
if: matrix.os == 'ubuntu-latest'
run: npm run test:prod
all:
name: all
needs: test
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- run: |
if [[ "${{ needs.test.result }}" != "success" ]]; then
echo "Matrix failed"
exit 1
fi