-
Notifications
You must be signed in to change notification settings - Fork 422
50 lines (41 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
44
45
46
47
48
49
50
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: Test
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Start Test Node
run: pnpm node:up
- name: Generate .env
run: cp packages/app/.env.example packages/app/.env
# Unit tests running with JEST
- name: Find PR number
uses: jwalton/gh-find-current-pr@v1
id: findPr
- name: Build libs
run: |
pnpm build:libs
- name: Run Jest Tests
run: |
pnpm test:ci
timeout-minutes: 10
env:
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Stop Test Node
run: pnpm node:clean