-
Notifications
You must be signed in to change notification settings - Fork 0
/
.github-actions.example.yml
64 lines (53 loc) · 1.51 KB
/
.github-actions.example.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
name: Deployment that runs Cypress tests in parallel before deploying
on:
pull_request:
branches:
- development
- main
jobs:
## ###############
## 💚 Automated testing
## ###############
automated-testing:
name: Pull request automated testing
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# run 4 copies of the current job in parallel, you may increase this number
containers: [ 1, 2, 3, 4 ]
steps:
# Clones repo to the commit that triggered the event
- name: Cloning repository
uses: actions/checkout@v3
# Check CI
- name: Run cypress tests
run: npx cypress-cloud run --browser chrome --parallel --record
# Upload the videos for debugging
- name: Upload video files
uses: actions/upload-artifact@v3
with:
name: cypress-videos ${{ matrix.containers }}
path: |
cypress/videos
cypress/screenshots
# Upload log files of this fun
- name: Upload all log files
uses: actions/upload-artifact@v3
with:
name: logfiles ${{ matrix.containers }}
path: |
*.log
**/*.log
## ###############
## 🚀 Deploy
## ###############
deploy-preview:
needs: automated-testing
runs-on: ubuntu-latest
steps:
# Clones repo to the commit that triggered the event
- name: Cloning repository
uses: actions/checkout@v3
# Do your deployment
# ...