-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (89 loc) · 2.6 KB
/
test.yml
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
name: Test
run-name: Test end-to-end
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
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
# - windows-latest
browser:
- electron
- chrome
- firefox
- webkit
include:
- os: ubuntu-latest
name: Linux
- os: macos-latest
name: macOS
- os: windows-latest
name: Windows
- os: windows-latest
name: Windows
browser: edge
exclude:
- os: windows-latest
browser: webkit
name: ${{ matrix.name }} - ${{ matrix.browser }}
runs-on: ${{ matrix.os }}
# add exceptions for failing jobs here
continue-on-error: false
steps:
- name: Setup firefox (macOS)
if: matrix.os == 'macos-latest' && matrix.browser == 'firefox'
uses: browser-actions/setup-firefox@v1
- name: Setup webkit (Linux)
if: matrix.os == 'ubuntu-latest' && matrix.browser == 'webkit'
run: npx playwright install-deps webkit
- uses: actions/checkout@v4
with:
submodules: true
- uses: leanprover/lean-action@v1
if: matrix.os != 'windows-latest'
with:
lake-package-directory: "demo/server/LeanProject"
use-mathlib-cache: false
auto-config: false
build: false
test: false
lint: false
- name: Install elan (Windows)
if: matrix.os == 'windows-latest'
run: |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf > elan-init.sh
bash elan-init.sh -y
echo "$(realpath ~/.elan/bin)" >> $GITHUB_PATH
- uses: actions/setup-node@v4
- run: npm install
- run: npm run setup_demo
- name: Run tests
if: matrix.os != 'windows-latest'
uses: cypress-io/github-action@v6
with:
start: npm start
wait-on: 'http://localhost:5173'
browser: ${{ matrix.browser }}
- name: Run test (Windows)
run: |
npx concurrently --hide 0 --kill-others \
"npm start" \
"npx wait-on http://localhost:5173 && \
cypress run --browser ${{ matrix.browser }}" -n server,cypress -s command-cypress
if: matrix.os == 'windows-latest'