-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (90 loc) · 3.14 KB
/
Copy pathtest.yml
File metadata and controls
100 lines (90 loc) · 3.14 KB
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
name: Test
on:
workflow_dispatch:
# FIXME - enable this after tests are setup
#push:
# branches:
# - main
pull_request_target:
types:
- opened
- reopened
- synchronize
- ready_for_review
paths:
- "packages/**"
- "samples/**"
- "serverless/**"
- "servers/**"
- "starters/**"
- "ai/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: false
jobs:
test:
name: test (${{ matrix.name }})
runs-on: [ubuntu-latest]
if: (!github.event.pull_request || github.event.pull_request.draft == false)
strategy:
fail-fast: false
matrix:
include:
- name: packages
filter: '--filter="./packages/*"'
- name: starters
filter: '--filter="./starters/*" --filter="!@nodeboot/starter-persistence"'
- name: persistence
filter: '--filter="@nodeboot/starter-persistence"'
docker_compose: "starters/persistence/tests/docker-compose.yaml"
flags: "--concurrency=1"
- name: servers
filter: '--filter="./servers/*"'
- name: serverless
filter: '--filter="./serverless/*"'
- name: ai
filter: '--filter="./ai/**"'
- name: samples
filter: '--filter="./samples/*"'
env:
CI: true
BACKSTAGE_CLI_BUILD_PARALLEL: 1
HUSKY_SKIP_HOOKS: 1
HUSKY: 0
NODE_OPTIONS: --max-old-space-size=4096
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use node.js
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "pnpm"
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: Start Docker services
if: matrix.docker_compose != ''
run: |
docker compose -f ${{ matrix.docker_compose }} up -d --wait
- name: Test with coverage
run: |
pnpm turbo run test:coverage ${{ matrix.filter }} ${{ matrix.flags }}
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: nodejs-boot/node-boot
fail_ci_if_error: false
verbose: true
flags: ${{ matrix.name }}