Skip to content

Commit 83d1d02

Browse files
authored
test: [pst deploy validatation (#132)
1 parent a983e1e commit 83d1d02

3 files changed

Lines changed: 647 additions & 12 deletions

File tree

.github/workflows/post-deploy-validation.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,44 @@ permissions:
1111
issues: write
1212

1313
jobs:
14-
published-cli-smoke:
14+
published-package-validation:
1515
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
16-
name: Published CLI Smoke Test (${{ matrix.os }})
16+
name: Published Package Validation (${{ matrix.os }})
1717
runs-on: ${{ matrix.os }}
18-
timeout-minutes: 10
18+
timeout-minutes: 20
1919
strategy:
2020
fail-fast: false
2121
matrix:
2222
os: [ubuntu-latest, macos-latest, windows-latest]
2323

2424
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
2528
- name: Setup Node.js
2629
uses: actions/setup-node@v4
2730
with:
2831
node-version: '20'
2932

30-
- name: Run published create-react-forge command
33+
- name: Run published npx validation and file checks
34+
env:
35+
CRF_PACKAGE_NAME: create-react-forge
36+
CRF_PACKAGE_SPEC: create-react-forge@latest
3137
run: |
32-
npx --yes create-react-forge@latest --version
33-
npx --yes create-react-forge@latest --help
38+
node scripts/post-deploy-validation.mjs
3439
3540
create-smoke-failure-issue:
36-
name: Create issue if post-deploy smoke test fails
37-
needs: published-cli-smoke
38-
if: ${{ always() && needs.published-cli-smoke.result == 'failure' }}
41+
name: Create issue if post-deploy validation fails
42+
needs: published-package-validation
43+
if: ${{ always() && needs.published-package-validation.result == 'failure' }}
3944
runs-on: ubuntu-latest
4045

4146
steps:
4247
- name: Create or update failure issue
4348
uses: actions/github-script@v7
4449
with:
4550
script: |
46-
const title = "Post-deploy validation failed: published create-react-forge smoke test";
51+
const title = "Post-deploy validation failed: published create-react-forge validation suite";
4752
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
4853
const sourceRunUrl = context.eventName === "workflow_run"
4954
? context.payload.workflow_run?.html_url
@@ -62,7 +67,7 @@ jobs:
6267
: "Manual workflow_dispatch run";
6368
6469
const body = [
65-
"The published CLI smoke test failed.",
70+
"The published package validation suite failed.",
6671
"",
6772
`- Trigger: ${triggerLabel}`,
6873
`- Validation workflow run: ${runUrl}`,

0 commit comments

Comments
 (0)