-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (56 loc) · 1.44 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
name: ci
on: push
jobs:
unit:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
# Install npm dependencies, cache them correctly
# but don't run Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v6
with:
runTests: false
- name: Run unit tsts
run: npm test
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
# Install npm dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v6
with:
# run unit tests
build: npm test
test-sync-mode:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress run
uses: cypress-io/github-action@v6
with:
config-file: cypress-sync.config.js
release:
runs-on: ubuntu-22.04
# only try releasing from the main branch
if: github.ref == 'refs/heads/main'
needs:
- unit
- test
- test-sync-mode
steps:
- name: Checkout
# https://github.com/actions/checkout
uses: actions/checkout@v4
- name: Semantic Release 🚀
uses: cycjimmy/semantic-release-action@v4
with:
branch: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}