|
1 | | -name: test |
| 1 | +name: Test |
2 | 2 |
|
3 | 3 | on: [push] |
4 | 4 |
|
5 | 5 | jobs: |
| 6 | + tsc: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + name: Typescript |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v2 |
| 11 | + |
| 12 | + - name: 💾 Cache Dependencies |
| 13 | + uses: actions/cache@v2 |
| 14 | + with: |
| 15 | + path: ./node_modules |
| 16 | + key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('**/yarn.lock') }} |
| 17 | + |
| 18 | + - name: 🔨 Install Dependencies & Build |
| 19 | + run: yarn install --frozen-lockfile --ignore-engines |
| 20 | + |
| 21 | + - name: 🧪 tsc |
| 22 | + run: yarn types |
| 23 | + |
| 24 | + e2e: |
| 25 | + runs-on: ubuntu-latest |
| 26 | + name: End-to-end tests |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v2 |
| 29 | + |
| 30 | + - name: 💾 Cache Dependencies |
| 31 | + uses: actions/cache@v2 |
| 32 | + with: |
| 33 | + path: ./node_modules |
| 34 | + key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('**/yarn.lock') }} |
| 35 | + |
| 36 | + - name: 🔨 Install Dependencies & Build |
| 37 | + run: yarn install --frozen-lockfile --ignore-engines |
| 38 | + |
| 39 | + - name: ⚗️ End-to-end tests |
| 40 | + run: | |
| 41 | + npx playwright install |
| 42 | + npx playwright install-deps |
| 43 | + yarn e2e-fixtures |
| 44 | + # running with --browser=all causes failures |
| 45 | + yarn e2e --browser=chromium |
| 46 | + yarn e2e --browser=webkit |
| 47 | + yarn e2e --browser=firefox |
| 48 | + env: |
| 49 | + E2E_JUMP_TO_MESSAGE_CHANNEL: jump-to-message |
| 50 | + E2E_ADD_MESSAGE_CHANNEL: add-message |
| 51 | + E2E_TEST_USER_1: test-user-1 |
| 52 | + E2E_TEST_USER_2: test-user-2 |
| 53 | + E2E_APP_KEY: ${{ secrets.E2E_APP_KEY }} |
| 54 | + E2E_APP_SECRET: ${{ secrets.E2E_APP_SECRET }} |
| 55 | + E2E_TEST_USER_1_TOKEN: ${{ secrets.E2E_TEST_USER_1_TOKEN }} |
| 56 | + E2E_TEST_USER_2_TOKEN: ${{ secrets.E2E_TEST_USER_2_TOKEN }} |
| 57 | + |
6 | 58 | test: |
7 | 59 | runs-on: ubuntu-latest |
8 | 60 | strategy: |
9 | 61 | matrix: |
10 | | - node: [10, 12, 14] |
11 | | - typescript: ['no'] |
12 | | - include: |
13 | | - - typescript: 'yes' |
| 62 | + node: [14, 16] |
| 63 | + name: Test with Node ${{ matrix.node }} |
14 | 64 | steps: |
15 | 65 | - uses: actions/checkout@v2 |
16 | 66 | - uses: actions/setup-node@v2-beta |
17 | 67 | with: |
18 | 68 | node-version: ${{ matrix.node }} |
19 | 69 |
|
20 | | - - name: Cache Dependencies |
| 70 | + - name: 💾 Cache Dependencies |
21 | 71 | uses: actions/cache@v2 |
22 | 72 | with: |
23 | 73 | path: ./node_modules |
24 | 74 | key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('**/yarn.lock') }} |
25 | 75 |
|
26 | | - - name: Install Dependencies & Build |
| 76 | + - name: 🔨 Install Dependencies & Build |
27 | 77 | run: yarn install --frozen-lockfile --ignore-engines |
28 | 78 |
|
29 | | - - name: Lint and Test with ${{ matrix.node }} |
| 79 | + - name: 🧪 Lint and Test with ${{ matrix.node }} |
30 | 80 | env: |
31 | 81 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
32 | | - TYPESCRIPT: ${{ matrix.typescript }} |
33 | 82 | run: | |
34 | | - if [ "$TYPESCRIPT" == "no" ]; then yarn lint; fi |
35 | | - if [ "$TYPESCRIPT" == "no" ]; then yarn coverage; fi |
36 | | - if [ "$TYPESCRIPT" == "no" ]; then yarn validate-translations; fi |
37 | | - if [ "$TYPESCRIPT" == "yes" ]; then yarn types; fi |
| 83 | + yarn lint |
| 84 | + yarn coverage |
| 85 | + yarn validate-translations |
0 commit comments