1+ name : Pull Request Checks
2+
13on :
24 pull_request :
3- branches :
4- - master
5+ push :
6+ workflow_dispatch :
57
68jobs :
9+ pr-checks :
10+ runs-on : ubuntu-latest
11+ name : PR Validation & Testing
12+
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+ with :
17+ fetch-depth : 0
18+
19+ - name : Setup Node.js
20+ uses : actions/setup-node@v4
21+ with :
22+ node-version : ' 20'
23+ cache : ' yarn'
24+
25+ - name : Install dependencies
26+ run : yarn install --frozen-lockfile
27+
28+ - name : Derive appropriate SHAs for base and head for nx affected commands
29+ uses : nrwl/nx-set-shas@v4
30+
31+ - name : Run lint on affected projects
32+ run : npx nx affected --target=lint --parallel=3
33+ continue-on-error : false
34+
35+ - name : Run typecheck on affected projects
36+ run : npx nx affected --target=typecheck --parallel=3
37+ continue-on-error : false
38+
39+ - name : Run tests on affected projects
40+ run : npx nx affected --target=test --parallel=3 --coverage
41+ continue-on-error : false
42+
43+ - name : Run build on affected projects
44+ run : npx nx affected --target=build --parallel=3
45+ continue-on-error : false
46+
47+ - name : Run Nx release dry-run
48+ id : nx-release-dry-run
49+ run : |
50+ echo "Running Nx release in dry-run mode..."
51+ npx nx release --dry-run --verbose 2>&1 | tee release-output.txt
52+ EXIT_CODE=${PIPESTATUS[0]}
53+
54+ if [ $EXIT_CODE -ne 0 ]; then
55+ echo "L Nx release dry-run FAILED with exit code $EXIT_CODE"
56+ echo "release_status=failed" >> $GITHUB_OUTPUT
57+ exit $EXIT_CODE
58+ else
59+ echo " Nx release dry-run SUCCEEDED"
60+ echo "release_status=success" >> $GITHUB_OUTPUT
61+ fi
62+ continue-on-error : false
63+
764 github-action-show-version :
865 runs-on : ubuntu-latest
966 name : Next version is
1269 uses : rvsia/github-action-show-version@v1.9alpha
1370 id : comment
1471 with :
15- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
72+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
0 commit comments