-
Notifications
You must be signed in to change notification settings - Fork 448
43 lines (37 loc) · 1.21 KB
/
pr-tests-jest.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
name: Tests Unit
on:
pull_request:
branches: [main, master, sdk-v2]
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests-jest:
name: Jest Tests [Shard ${{ matrix.shard }}]
runs-on: buildjet-8vcpu-ubuntu-2204-arm
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- name: Extract pnpm version from .tool-versions
id: get_pnpm
run: |
PNPM_VERSION=$(grep '^pnpm' .tool-versions | awk '{print $2}')
echo "PNPM_VERSION=${PNPM_VERSION}" >> $GITHUB_ENV
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: ${{ env.PNPM_VERSION }}
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# Unit tests running with JEST
- name: Run Jest Tests
run: pnpm test:ci --shard ${{ matrix.shard }}/4
timeout-minutes: 10
- name: Stop Test Node
run: pnpm node:clean