-
-
Notifications
You must be signed in to change notification settings - Fork 393
65 lines (53 loc) · 1.65 KB
/
build-metro.yml
File metadata and controls
65 lines (53 loc) · 1.65 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
name: Build Metro Packages
on:
workflow_call:
permissions:
contents: read
actions: read
jobs:
build-metro:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout Repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Cache Tool Downloads
uses: actions/cache@v5
with:
path: ~/.cache
key: ${{ runner.os }}-toolcache-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-toolcache-
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js 20
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Set Nx SHA
uses: nrwl/nx-set-shas@v4
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Build All Required Packages
run: |
npx nx run-many --targets=build --projects=tag:type:pkg,tag:type:metro --parallel=4
- name: Test Metro Packages
uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 5
command: npx nx affected -t test --parallel=2 --exclude='*,!tag:type:metro'
- name: Lint Metro Packages
run: npx nx run-many --targets=lint --projects=tag:type:metro --parallel=2
- name: Check Metro Package Publishing Compatibility
run: |
for pkg in packages/metro-*; do
if [ -f "$pkg/package.json" ]; then
echo "Checking $pkg..."
npx publint "$pkg"
fi
done