-
Notifications
You must be signed in to change notification settings - Fork 278
101 lines (86 loc) Β· 3.03 KB
/
ci.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
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
95
96
97
98
99
100
101
name: Test
on: [push]
env:
NODE_OPTIONS: --max_old_space_size=4096
jobs:
tsc:
runs-on: ubuntu-latest
name: Typescript
steps:
- uses: actions/checkout@v3
- name: πΎ Cache Dependencies
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: π¨ Install Dependencies
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts
- name: π§ͺ tsc
run: yarn types --noEmit
e2e:
runs-on: ubuntu-latest
name: End-to-end tests
steps:
- uses: actions/checkout@v3
- name: πΎ Cache Dependencies
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: π¨ Install Dependencies
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts
- name: βοΈ End-to-end tests
run: |
npx playwright install
npx playwright install-deps
yarn e2e-fixtures
# running with --browser=all causes failures
yarn e2e --browser=chromium
yarn e2e --browser=webkit
yarn e2e --browser=firefox
env:
E2E_JUMP_TO_MESSAGE_CHANNEL: jump-to-message
E2E_ADD_MESSAGE_CHANNEL: add-message
E2E_TEST_USER_1: test-user-1
E2E_TEST_USER_2: test-user-2
E2E_APP_KEY: ${{ secrets.E2E_APP_KEY }}
E2E_APP_SECRET: ${{ secrets.E2E_APP_SECRET }}
E2E_TEST_USER_1_TOKEN: ${{ secrets.E2E_TEST_USER_1_TOKEN }}
E2E_TEST_USER_2_TOKEN: ${{ secrets.E2E_TEST_USER_2_TOKEN }}
E2E_ADDITIONAL_CHANNELS: mr-channel-1, mr-channel-2, edit-message-channel, pin-message-channel
E2E_LONG_MESSAGE_LISTS_CHANNEL: navigate-long-message-lists
E2E_ATTACHMENT_SIZING_CHANNEL: attachment-sizing
- name: π₯ Upload Artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: E2E_Artifacts
path: ./test-results
retention-days: 1
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18]
name: Test with Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: πΎ Cache Dependencies
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: π¨ Install Dependencies & Build
run: yarn install --frozen-lockfile --ignore-engines
- name: π§ͺ Lint and Test with ${{ matrix.node }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
yarn lint
yarn coverage
yarn validate-translations
- name: π§ͺ Validate CommonJS bundle with ${{ matrix.node }}
run: yarn validate-cjs