ci: add health check pipeline
This commit is contained in:
parent
606cb8e764
commit
5f725fa878
|
|
@ -0,0 +1,39 @@
|
|||
name: Check Swagger API
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '35 17 */4 * 4'
|
||||
|
||||
jobs:
|
||||
e2e_tests:
|
||||
name: E2E test
|
||||
env:
|
||||
CI: true
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
# https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
|
||||
- name: Use Node.js 16.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
- name: Get yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --skip-integrity-check --non-interactive --no-progress
|
||||
|
||||
- name: E2E test
|
||||
run: yarn test:e2e:prod
|
||||
|
|
@ -14,6 +14,7 @@
|
|||
"test:unit:ci": "cypress run --component --quiet --reporter spec",
|
||||
"test:e2e": "yarn build && concurrently -rk -s first \"yarn serve\" \"cypress open --e2e -c baseUrl=http://localhost:4137\"",
|
||||
"test:e2e:ci": "yarn build && concurrently -rk -s first \"yarn serve\" \"cypress run --e2e -c baseUrl=http://localhost:4137\"",
|
||||
"test:e2e:prod": "cypress run --e2e -c baseUrl=https://vue3-realworld-example-app-mutoe.vercel.app",
|
||||
"test": "yarn test:unit:ci && yarn test:e2e:ci",
|
||||
"generate:api": "sta -p https://raw.githubusercontent.com/gothinkster/realworld/main/api/openapi.yml -o ./src/services -n api.ts"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue