-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (39 loc) · 1.07 KB
/
github-actions.yml
File metadata and controls
46 lines (39 loc) · 1.07 KB
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
name: api-testing-portfolio
on:
push:
pull_request:
jobs:
api-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Dependencies
run: |
if [ -f package-lock.json ]; then
npm ci
else
npm install
fi
- name: Cypress run
continue-on-error: true
uses: cypress-io/github-action@v6
with:
command: npm run test-prod
- name: Upload HTML report
if: always()
id: upload-report
uses: actions/upload-artifact@v4
with:
name: cypress-html-report
path: cypress/reports/index.html
if-no-files-found: warn
- name: Publish report link
if: always()
run: |
echo "## Cypress Report" >> $GITHUB_STEP_SUMMARY
echo "[Open HTML report artifact](${{ steps.upload-report.outputs.artifact-url }})" >> $GITHUB_STEP_SUMMARY