-
Notifications
You must be signed in to change notification settings - Fork 13
88 lines (76 loc) · 2.41 KB
/
ci.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: ci
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Run Cypress tests 🧪
# https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v6
with:
# check if the types agree
build: npm run types
# https://github.com/actions/upload-artifact
- uses: actions/upload-artifact@v4
name: Store any error screenshots 🖼
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v4
name: Store any videos 🖼
if: failure()
with:
name: cypress-videos
path: cypress/videos
# there was a breaking change under the hood in Cypress v11.1.0
# so make sure this plugin still works for older versions
test-cypress-v11-0:
runs-on: ubuntu-20.04
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Run Cypress tests 🧪
# https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v6
with:
build: npm install -D cypress@11.0.1
test-cypress-v9:
runs-on: ubuntu-20.04
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Install top dependencies 📦
# https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v6
with:
runTests: false
- name: Run Cypress v9 tests 🧪
uses: cypress-io/github-action@v6
with:
working-directory: cypress-v9
# https://github.com/actions/upload-artifact
- uses: actions/upload-artifact@v4
name: Store any v9 screenshots 🖼
if: failure()
with:
name: cypress-screenshots-v9
path: cypress-v9/cypress/screenshots
release:
needs: [test, test-cypress-v9, test-cypress-v11-0]
runs-on: ubuntu-20.04
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
- name: Install only the semantic release 📦
run: npm install semantic-release
- name: Semantic Release 🚀
uses: cycjimmy/semantic-release-action@v4
with:
branch: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}