-
Notifications
You must be signed in to change notification settings - Fork 258
67 lines (58 loc) · 2.73 KB
/
Copy pathci-trigger.yml
File metadata and controls
67 lines (58 loc) · 2.73 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
name: CI
on:
pull_request:
branches: [master]
permissions:
contents: read
jobs:
ci:
name: CI - lint / typecheck / test
runs-on: ubuntu-latest
# Forward Stage-5 integration-test secrets into the CI environment.
# The shared `0xPolygon/pipelines/.github/actions/ci@main` composite
# action runs `pnpm test`; vars composed here in `job.env` reach
# vitest automatically, where the SDK's integration tests gate on
# `process.env.POS_SDK_TEST_PRIVATE_KEY` etc. via `describe.skipIf`.
#
# When a secret is unset (forks, contributor PRs without secret
# access) the integration suite skips silently and only the unit
# layer runs. The `e2e` cycle test is NEVER enabled on this PR
# workflow — it lives on the nightly schedule (see ci-nightly.yml)
# because each adapter run takes ~30–90 minutes.
env:
POS_SDK_TEST_PARENT_RPC: ${{ secrets.POS_SDK_TEST_PARENT_RPC }}
POS_SDK_TEST_CHILD_RPC: ${{ secrets.POS_SDK_TEST_CHILD_RPC }}
POS_SDK_TEST_PRIVATE_KEY: ${{ secrets.POS_SDK_TEST_PRIVATE_KEY }}
steps:
- uses: 0xPolygon/pipelines/.github/actions/ci@main
build:
# Verify the tsup build succeeds across the Node versions the SDK
# declares as supported (`engines.node: ">=20"`).
#
# The `!startsWith(github.head_ref, 'changeset-release/')` guard is
# applied to every step rather than the job: a job-level `if:` produces
# a `skipped` conclusion, which GitHub treats as "not run" for required
# status checks, blocking the auto-opened Release / Deploy PR. Skipping
# at the step level lets the job report `success` while doing no work.
name: build (${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x, 24.x]
steps:
- name: Skip build on changeset-release branches
if: startsWith(github.head_ref, 'changeset-release/')
run: echo "Skipping build — Release / Deploy PRs only contain version bumps and changelog entries."
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
if: "!startsWith(github.head_ref, 'changeset-release/')"
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
if: "!startsWith(github.head_ref, 'changeset-release/')"
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
if: "!startsWith(github.head_ref, 'changeset-release/')"
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install --frozen-lockfile
if: "!startsWith(github.head_ref, 'changeset-release/')"
- run: pnpm --filter @polygonlabs/pos-sdk run build
if: "!startsWith(github.head_ref, 'changeset-release/')"