-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (63 loc) · 1.54 KB
/
main.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: Main
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: 'lts/*'
- name: node check
run: |
npm ci
npm run test:ci
env:
CI: true
cypress:
runs-on: ubuntu-latest
strategy:
matrix:
browser:
- chrome
- firefox
- edge
start:
- npm run react:component:serve
- npm run vue:component:serve
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress run
uses: cypress-io/github-action@v6
with:
config-file: 'test/component/cypress.config.ts'
start: ${{ matrix.start }}
browser: ${{ matrix.browser }}
status-checks:
name: status-checks
needs:
- build
- cypress
permissions:
contents: none
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Validation Status checks
run: |
echo 'Configuration for Status checks that are required'
echo '${{ toJSON(needs) }}'
if [[ (('skipped' == '${{ needs.build.result }}') || ('success' == '${{ needs.build.result }}')) && (('skipped' == '${{ needs.cypress.result }}') || ('success' == '${{ needs.cypress.result }}')) ]]; then
exit 0
fi
exit 1