Skip to content

Commit 06a82ce

Browse files
fix(ci): add monorepo readme command to test-omnix-template job
Signed-off-by: Cameron Smith <cameron.ray.smith@gmail.com>
1 parent a4d9e6c commit 06a82ce

File tree

1 file changed

+37
-9
lines changed

1 file changed

+37
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,24 +200,54 @@ jobs:
200200
# If we don't install omnix here, it will just clutter the log of the next step
201201
run: nix --accept-flake-config profile install "github:juspay/omnix"
202202

203-
- name: Test template initialization
204-
# This script executes the tl;dr one-liner from the README
203+
# These tests execute the tl;dr one-liners from the README
204+
- name: Test monorepo template initialization
205205
run: |
206206
REPO_REF="github:sciexp/python-nix-template/${{ needs.set-variables.outputs.checkout_rev }}"
207207
echo "Using repository reference: $REPO_REF"
208208
209+
pwd
210+
rm -fr pnt-mono
211+
212+
nix --accept-flake-config run github:juspay/omnix -- init "$REPO_REF" -o pnt-mono --non-interactive --params '{
213+
"package-name-kebab-case": "pnt-mono",
214+
"package-name-snake-case": "pnt_mono",
215+
"monorepo-package": true,
216+
"git-org": "pnt-mono",
217+
"author": "Pnt Mono",
218+
"author-email": "mono@pnt.org",
219+
"vscode": true,
220+
"github-ci": true,
221+
"nix-template": true
222+
}'
223+
224+
cd pnt-mono
225+
git init
226+
git config --local user.email "test@example.com"
227+
git config --local user.name "Test User"
228+
git commit --allow-empty -m "initial commit (empty)"
229+
git add .
230+
231+
nix develop --accept-flake-config -c pytest
232+
233+
- name: Test single-package template initialization
234+
run: |
235+
REPO_REF="github:sciexp/python-nix-template/${{ needs.set-variables.outputs.checkout_rev }}"
236+
echo "Using repository reference: $REPO_REF"
237+
238+
pwd
209239
rm -fr pnt-new
210240
211241
nix --accept-flake-config run github:juspay/omnix -- init "$REPO_REF" -o pnt-new --non-interactive --params '{
212242
"package-name-kebab-case": "pnt-new",
213243
"package-name-snake-case": "pnt_new",
214-
"include-functional-package": false,
244+
"monorepo-package": false,
215245
"git-org": "pnt-new",
216246
"author": "Pnt New",
217247
"author-email": "new@pnt.org",
218-
"include-vscode": true,
219-
"include-github-ci": true,
220-
"include-flake-template": false
248+
"vscode": true,
249+
"github-ci": true,
250+
"nix-template": false
221251
}'
222252
223253
cd pnt-new
@@ -227,14 +257,12 @@ jobs:
227257
git commit --allow-empty -m "initial commit (empty)"
228258
git add .
229259
230-
# TODO: remove on resolution of https://github.com/juspay/omnix/issues/425
231-
nix run .#fix-template-names -- python-nix-template
232260
# This needs to use a global uv (astral-sh/setup-uv) before entering
233261
# the devshell even though uv is included in the devshell
234262
nix run nixpkgs#uv -- lock
235263
git add .
236264
237-
nix develop -c pytest
265+
nix develop --accept-flake-config -c pytest
238266
239267
test-python:
240268
needs: [set-variables]

0 commit comments

Comments
 (0)