|
7 | 7 | pull_request:
|
8 | 8 | branches: ["main"]
|
9 | 9 | jobs:
|
10 |
| - start-server: |
11 |
| - name: Start server |
12 |
| - runs-on: ubuntu-latest |
13 |
| - # outputs: |
14 |
| - # server-url: ${{ steps.server-output.outputs.server-url }} |
15 |
| - steps: |
16 |
| - - uses: actions/checkout@v4 |
17 |
| - with: |
18 |
| - submodules: true |
19 |
| - - uses: actions/setup-node@v4 |
20 |
| - - uses: leanprover/lean-action@v1 |
21 |
| - with: |
22 |
| - lake-package-directory: "demo/server/LeanProject" |
23 |
| - use-mathlib-cache: false |
24 |
| - auto-config: false |
25 |
| - build: true |
26 |
| - test: false |
27 |
| - lint: false |
28 |
| - - name: Install dependencies |
29 |
| - run: npm install |
30 |
| - - name: Install demo |
31 |
| - run: npm run setup_demo |
32 |
| - # - name: Build lean4monaco |
33 |
| - # run: npm run build |
34 |
| - # - name: Build demo server |
35 |
| - # run: | |
36 |
| - # cd demo |
37 |
| - # npm run build |
38 |
| - - name: Start server |
39 |
| - id: start-server |
40 |
| - run: | |
41 |
| - nohup npm start > nohup.out 2> nohup.err < /dev/null & |
42 |
| - echo "server is running..." |
43 |
| -# cd demo |
44 |
| -# echo "Starting server..." |
45 |
| -# npm run start |
46 |
| -# # nohup npm run start > nohup.out 2> nohup.err < /dev/null & |
47 |
| -# echo "server is running." |
48 | 10 | test:
|
49 |
| - strategy: |
50 |
| - fail-fast: false |
51 |
| - matrix: |
52 |
| - include: |
53 |
| - - name: Linux |
54 |
| - os: ubuntu-latest |
55 |
| - # - name: macOS |
56 |
| - # os: macos-latest |
57 |
| - - name: Windows |
58 |
| - os: windows-latest |
59 |
| - name: ${{ matrix.name }} |
60 |
| - runs-on: ${{ matrix.os }} |
61 |
| - needs: start-server |
| 11 | + runs-on: ubuntu-latest |
62 | 12 | steps:
|
63 | 13 | - uses: actions/checkout@v4
|
64 | 14 | with:
|
65 | 15 | submodules: true
|
66 |
| - - uses: actions/setup-node@v4 |
67 |
| - - name: Install dependencies |
68 |
| - run: npm install |
69 |
| - # - name: Wait for server |
70 |
| - # run: | |
71 |
| - # echo "Pinging the server to check if it's up..." |
72 |
| - # for i in {1..30}; do |
73 |
| - # curl -sSf http://localhost:5173 && break |
74 |
| - # echo "Waiting for server..." |
75 |
| - # sleep 5 |
76 |
| - # done |
77 |
| - # - name: Run Cypress tests |
78 |
| - # run: | |
79 |
| - # # wait-on http://localhost:5173 |
80 |
| - # cypress run |
81 |
| - |
82 |
| - # # # Install npm dependencies, cache them correctly |
83 |
| - # and run all Cypress tests |
| 16 | + - name: build docker image |
| 17 | + run: docker build -t hhu-adam/lean4monaco . |
| 18 | + - name: start server |
| 19 | + run: docker run -dit -p 5173:5173 -p 8080:8080 hhu-adam/lean4monaco |
84 | 20 | - name: Run tests
|
85 | 21 | uses: cypress-io/github-action@v6
|
86 |
| - # with: |
| 22 | + with: |
| 23 | + browser: chrome |
87 | 24 | # start: npm start
|
88 |
| - # wait-on: 'http://localhost:5173' |
| 25 | + wait-on: 'http://localhost:5173' |
| 26 | + |
| 27 | + |
| 28 | +# start-server: |
| 29 | +# name: Start server |
| 30 | +# runs-on: ubuntu-latest |
| 31 | +# # outputs: |
| 32 | +# # server-url: ${{ steps.server-output.outputs.server-url }} |
| 33 | +# steps: |
| 34 | +# - uses: actions/checkout@v4 |
| 35 | +# with: |
| 36 | +# submodules: true |
| 37 | +# - uses: actions/setup-node@v4 |
| 38 | +# - uses: leanprover/lean-action@v1 |
| 39 | +# with: |
| 40 | +# lake-package-directory: "demo/server/LeanProject" |
| 41 | +# use-mathlib-cache: false |
| 42 | +# auto-config: false |
| 43 | +# build: true |
| 44 | +# test: false |
| 45 | +# lint: false |
| 46 | +# - name: Install dependencies |
| 47 | +# run: npm install |
| 48 | +# - name: Build and setup demo |
| 49 | +# run: npm run setup_demo |
| 50 | +# # - name: Build lean4monaco |
| 51 | +# # run: npm run build |
| 52 | +# # - name: Build demo server |
| 53 | +# # run: | |
| 54 | +# # cd demo |
| 55 | +# # npm run build |
| 56 | +# - name: Start server |
| 57 | +# id: start-server |
| 58 | +# run: | |
| 59 | +# nohup npm start > nohup.out 2> nohup.err < /dev/null & |
| 60 | +# echo "server is running..." |
| 61 | +# # cd demo |
| 62 | +# # echo "Starting server..." |
| 63 | +# # npm run start |
| 64 | +# # # nohup npm run start > nohup.out 2> nohup.err < /dev/null & |
| 65 | +# # echo "server is running." |
| 66 | +# test: |
| 67 | +# strategy: |
| 68 | +# fail-fast: false |
| 69 | +# matrix: |
| 70 | +# include: |
| 71 | +# - name: Linux |
| 72 | +# os: ubuntu-latest |
| 73 | +# # - name: macOS |
| 74 | +# # os: macos-latest |
| 75 | +# - name: Windows |
| 76 | +# os: windows-latest |
| 77 | +# name: ${{ matrix.name }} |
| 78 | +# runs-on: ${{ matrix.os }} |
| 79 | +# needs: start-server |
| 80 | +# steps: |
| 81 | +# - uses: actions/checkout@v4 |
| 82 | +# with: |
| 83 | +# submodules: true |
| 84 | +# - uses: actions/setup-node@v4 |
| 85 | +# - name: Install dependencies |
| 86 | +# run: npm install |
| 87 | +# # - name: Wait for server |
| 88 | +# # run: | |
| 89 | +# # echo "Pinging the server to check if it's up..." |
| 90 | +# # for i in {1..30}; do |
| 91 | +# # curl -sSf http://localhost:5173 && break |
| 92 | +# # echo "Waiting for server..." |
| 93 | +# # sleep 5 |
| 94 | +# # done |
| 95 | +# # - name: Run Cypress tests |
| 96 | +# # run: | |
| 97 | +# # # wait-on http://localhost:5173 |
| 98 | +# # cypress run |
| 99 | + |
| 100 | +# # # # Install npm dependencies, cache them correctly |
| 101 | +# # and run all Cypress tests |
| 102 | +# - name: Run tests |
| 103 | +# uses: cypress-io/github-action@v6 |
| 104 | +# with: |
| 105 | +# browser: chrome |
| 106 | +# # start: npm start |
| 107 | +# # wait-on: 'http://localhost:5173' |
0 commit comments