forked from element-hq/element-call
-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (74 loc) · 2.65 KB
/
Copy pathtest.yaml
File metadata and controls
74 lines (74 loc) · 2.65 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# zizmor: ignore[unfenced-secrets]
name: Test
on:
pull_request: {}
push:
branches: [livekit, full-mesh]
env:
PNPM_CONFIG_PM_ON_FAIL: ignore
jobs:
vitest:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Enable Corepack
run: corepack enable
- name: Setup pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: pnpm cache
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
cache: "pnpm"
node-version-file: ".node-version"
- name: Install dependencies
run: "pnpm install --frozen-lockfile"
- name: Coverage
run: "pnpm run test:coverage"
# zizmor: ignore[unfenced-secrets]
- name: Upload coverage to Codecov
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
if: ${{ secrets.CODECOV_TOKEN != '' }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true
playwright:
name: Playwright Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: Enable Corepack
run: corepack enable
- name: Setup pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
- name: pnpm cache
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
cache: "pnpm"
node-version-file: ".node-version"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install playwright browsers
run: pnpm exec playwright install --with-deps
- name: Create local config
run: |
cp config/sample.json public/config.json
jq '.features.livekit_allow_screenshare_on_active_sfu = true' public/config.json > public/config.json.tmp && mv public/config.json.tmp public/config.json
jq '.livekit_edge_url = "http://localhost:7880"' public/config.json > public/config.json.tmp && mv public/config.json.tmp public/config.json
- name: Run Playwright tests
env:
USE_DOCKER: 1
run: pnpm exec playwright test
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 3