fix: fix CI error by auto waiting for localhost:7001 to start up (#1548)

This commit is contained in:
jakiuncle 2023-02-14 14:50:58 +08:00 committed by GitHub
parent 389744a27d
commit 29f1ec08a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,21 +97,20 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 16
- name: back start
run: nohup go run ./main.go &
working-directory: ./
- name: front install
run: yarn install
working-directory: ./web
- name: front start
run: nohup yarn start &
working-directory: ./web
- name: back start
run: nohup go run ./main.go &
working-directory: ./
- name: Sleep for starting
run: sleep 90s
shell: bash
- name: e2e
run: npx cypress run --spec "**/e2e/**.cy.js"
working-directory: ./web
- uses: cypress-io/github-action@v4
with:
working-directory: ./web
wait-on: 'http://localhost:7001'
wait-on-timeout: 180
- uses: actions/upload-artifact@v3
if: failure()