mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 20:50:19 +08:00
39
.github/workflows/build.yml
vendored
39
.github/workflows/build.yml
vendored
@ -76,11 +76,48 @@ jobs:
|
||||
version: latest
|
||||
args: --disable-all -c dummy.yml -E=gofumpt --max-same-issues=0 --timeout 5m --modules-download-mode=mod
|
||||
|
||||
e2e:
|
||||
name: e2e-test
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ frontend, backend, linter ]
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_DATABASE: casdoor
|
||||
MYSQL_ROOT_PASSWORD: 123456
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '^1.16.5'
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
- 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 60s
|
||||
shell: bash
|
||||
- name: e2e
|
||||
run: npx cypress run --spec "**/e2e/**.cy.js"
|
||||
working-directory: ./web
|
||||
|
||||
release-and-push:
|
||||
name: Release And Push
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'casdoor/casdoor' && github.event_name == 'push'
|
||||
needs: [ frontend, backend, linter ]
|
||||
needs: [ frontend, backend, linter, e2e ]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
Reference in New Issue
Block a user