-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (47 loc) · 1.45 KB
/
_02_checks.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
on:
workflow_call:
inputs:
package:
description: 'Package to lint'
type: string
default: 'all'
env:
FORCE_COLOR: 1
DB_NAME: 'swap'
DB_USER: 'postgres'
DB_PASS: 'postgres'
DB_PORT: '5432'
DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/swap?schema=public'
jobs:
generate-matrix:
uses: ./.github/workflows/_utils_generate_matrix.yml
with:
package: ${{ inputs.package }}
test:
needs: [generate-matrix]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.generate-matrix.outputs.matrix).package }}
node_version: ${{ fromJson(needs.generate-matrix.outputs.matrix).node_version }}
include: ${{ fromJson(needs.generate-matrix.outputs.matrix).include }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install pnpm 💿
run: npm i -g pnpm@9
- name: Setup Node.js ${{ matrix.node_version }} 🎮
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
- name: Install dependencies 📦
run: |
for i in {1..5}
do
pnpm install && break
sleep 10
done
- name: Run Test ${{ matrix.package }} 🧪
run: pnpm run --filter ${{ matrix.package }} test:ci