-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (67 loc) · 1.84 KB
/
build.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
name: Test on Linux server
run-name: Test on Linux server
on:
workflow_dispatch:
push:
branches: ["main"] # replace "main" with the default branch
pull_request:
branches: ["main"]
jobs:
start-server:
runs-on: ubuntu-latest
# outputs:
# server-url: ${{ steps.server-output.outputs.server-url }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
- uses: leanprover/lean-action@v1
with:
lake-package-directory: "demo/server/LeanProject"
use-mathlib-cache: false
auto-config: false
build: true
test: false
lint: false
- name: Install dependencies
run: npm install
- name: Install server dependencies
run: |
cd demo/server
npm install
- name: Build lean4monaco
run: npm run build
- name: Build demo server
run: |
cd demo/server
npm run build
- name: Start server
id: start-server
run: |
cd demo/server
echo "Starting server..."
nohup npm run start > nohup.out 2> nohup.err < /dev/null &
echo "server is running."
run-cypress:
runs-on: windows-latest
needs: start-server
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
- name: Install dependencies
run: npm install
# - name: Wait for server
# run: |
# echo "Pinging the server to check if it's up..."
# for i in {1..30}; do
# curl -sSf http://localhost:5173 && break
# echo "Waiting for server..."
# sleep 5
# done
- name: Run Cypress tests
run: |
wait-on http://localhost:5173
cypress run