-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.26 KB
/
test.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
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-logs:
timeout-minutes: 10
runs-on: ubuntu-latest
env:
SECRET_MONGODB_CONNECTION_STRING: ${{ secrets.SECRET_MONGODB_CONNECTION_STRING }}
PUBLIC_YOUR_DOMAIN: ${{ secrets.PUBLIC_YOUR_DOMAIN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Create cache directory if not exists
run: mkdir -p ~/.npm
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Test Playwright API
run: npx playwright test --project="Google Chrome"
- name: Upload Playwright Report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 7