-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.2 KB
/
cypress.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
name: Run Cypress
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build cypress
run: |
cd ./test/cypress
yarn
- name: run test
run: |
cd ./test/cypress
yarn cypress run --reporter mochawesome
- name: safe report as artifact
uses: actions/upload-artifact@v2
with:
name: mochawesome-report
path: test/cypress/mochawesome-report
upload:
if: ${{ !cancelled() && github.ref == 'refs/heads/main'}}
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: get report as artifact
uses: actions/download-artifact@v2
with:
name: mochawesome-report
path: test/cypress/mochawesome-report
- uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: "test/cypress/mochawesome-report"