You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); if(!(pkg.scripts||{}).lint){console.error('package.json is present but missing a lint script.'); process.exit(1)}"
32
+
if [ -f package-lock.json ]; then
33
+
npm ci
34
+
else
35
+
npm install
36
+
fi
37
+
npm run lint
38
+
exit 0
39
+
fi
40
+
41
+
if [ -f pyproject.toml ] || [ -f requirements.txt ] || [ -f requirements-dev.txt ]; then
42
+
if [ ! -f Makefile ] || ! grep -q '^lint:' Makefile; then
43
+
echo 'Python repo detected but Makefile lint target is missing.'
44
+
exit 1
45
+
fi
46
+
make lint
47
+
exit 0
48
+
fi
49
+
50
+
if find . -name '*.tf' -print -quit | grep -q .; then
node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); if(!(pkg.scripts||{}).typecheck){console.error('package.json is present but missing a typecheck script.'); process.exit(1)}"
72
+
if [ -f package-lock.json ]; then
73
+
npm ci
74
+
else
75
+
npm install
76
+
fi
77
+
npm run typecheck
78
+
exit 0
79
+
fi
80
+
81
+
if [ -f pyproject.toml ] || [ -f requirements.txt ] || [ -f requirements-dev.txt ]; then
82
+
if [ ! -f Makefile ] || ! grep -q '^typecheck:' Makefile; then
83
+
echo 'Python repo detected but Makefile typecheck target is missing.'
node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); if(!(pkg.scripts||{}).test){console.error('package.json is present but missing a test script.'); process.exit(1)}"
107
+
if [ -f package-lock.json ]; then
108
+
npm ci
109
+
else
110
+
npm install
111
+
fi
112
+
npm run test
113
+
exit 0
114
+
fi
115
+
116
+
if [ -f pyproject.toml ] || [ -f requirements.txt ] || [ -f requirements-dev.txt ]; then
117
+
if [ ! -f Makefile ] || ! grep -q '^test:' Makefile; then
118
+
echo 'Python repo detected but Makefile test target is missing.'
119
+
exit 1
120
+
fi
121
+
make test
122
+
exit 0
123
+
fi
124
+
125
+
echo 'No implementation assets detected yet; bootstrap test gate passes.'
126
+
9
127
build:
128
+
name: build
10
129
runs-on: ubuntu-latest
130
+
needs:
131
+
- lint
132
+
- typecheck
133
+
- test
11
134
steps:
12
135
- uses: actions/checkout@v4
13
-
- name: CI placeholder
14
-
run: echo "CI checks passed"
136
+
- uses: actions/setup-node@v4
137
+
with:
138
+
node-version: 20
139
+
- name: Run build
140
+
shell: bash
141
+
run: |
142
+
set -euo pipefail
143
+
144
+
if [ -f package.json ]; then
145
+
node -e "const fs=require('fs'); const pkg=JSON.parse(fs.readFileSync('package.json','utf8')); if(!(pkg.scripts||{}).build){console.error('package.json is present but missing a build script.'); process.exit(1)}"
146
+
if [ -f package-lock.json ]; then
147
+
npm ci
148
+
else
149
+
npm install
150
+
fi
151
+
npm run build
152
+
exit 0
153
+
fi
154
+
155
+
if [ -f pyproject.toml ] || [ -f requirements.txt ] || [ -f requirements-dev.txt ]; then
156
+
if [ ! -f Makefile ] || ! grep -q '^build:' Makefile; then
157
+
echo 'Python repo detected but Makefile build target is missing.'
0 commit comments