-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (70 loc) · 2.52 KB
/
tests.yml
File metadata and controls
94 lines (70 loc) · 2.52 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Tests
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
workflow-lint:
runs-on: ubuntu-latest
steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4
- name: Run actionlint
uses: devops-actions/actionlint@v0.1.10
eslint:
needs: workflow-lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 22.x, 24.x ]
steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4
- name: Setup dependencies
uses: ./.github/actions/setup-dependencies
with:
node-version: ${{ matrix.node-version }}
- name: Build worktree
run: yarn workspaces foreach -A --topological-dev run build
- name: Run eslint
run: yarn eslint
tests:
needs: eslint
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 22.x, 24.x ]
steps:
- name: Using branch ${{ github.ref }} for repository ${{ github.repository }}.
uses: actions/checkout@v4
- name: Setup dependencies
uses: ./.github/actions/setup-dependencies
with:
node-version: ${{ matrix.node-version }}
- name: Build worktree
run: yarn workspaces foreach -A --topological-dev run build
- name: Run tests
run: yarn test
- name: Run coverage
if: ${{ matrix.node-version == '24.x' }}
run: yarn test:coverage
- name: Run typecheck tests
run: yarn vitest run -c packages/v1-contexts/vitest.config.ts --typecheck.only --typecheck.checker tsc --typecheck.tsconfig packages/v1-contexts/tsconfig.json
- name: Install Playwright Chromium
if: ${{ matrix.node-version == '24.x' }}
run: yarn workspace @retailcrm/embed-ui-v1-endpoint exec playwright install --with-deps chromium
- name: Run v1-endpoint e2e tests
if: ${{ matrix.node-version == '24.x' }}
run: yarn workspace @retailcrm/embed-ui-v1-endpoint run test:e2e
- name: Upload v1-endpoint e2e screenshots
if: ${{ failure() && matrix.node-version == '24.x' }}
uses: actions/upload-artifact@v4
with:
name: v1-endpoint-playwright-screenshots-${{ matrix.node-version }}
path: packages/v1-endpoint/artifacts/playwright/screenshots
if-no-files-found: ignore