-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.43 KB
/
tests.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
name: Run Tests
on:
pull_request:
# all branches
branches:
- "*"
push:
branches: [main]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Run unit-tests
run: |
bun install --frozen-lockfile && bun run test
integration-tests:
timeout-minutes: 300
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: |
bun install --frozen-lockfile && bun run playwright install --with-deps
# NOTE: using hard-coded URL
# - name: Waiting for 200 from the Vercel Preview
# uses: patrickedqvist/wait-for-vercel-preview@v1.3.1
# id: waitFor200
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# max_timeout: 300
# access preview url
- name: Inject testing URL
run: echo "TEST_URL=https://podcodar.org" >> $GITHUB_ENV
# NOTE: using hard-coded URL
# run: echo "TEST_URL=${{steps.waitFor200.outputs.url}}" >> $GITHUB_ENV
- name: Run Playwright tests
run: bun run e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 2