-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: enable namaka ci tests based on the previous commit
- Loading branch information
Showing
9 changed files
with
84 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ jobs: | |
id: discovery | ||
|
||
build_cli: | ||
needs: discover | ||
needs: [discover, check_tests] | ||
if: fromJSON(needs.discover.outputs.hits).cli.build != '{}' | ||
strategy: | ||
fail-fast: false | ||
|
@@ -67,7 +67,7 @@ jobs: | |
extra_nix_config: ${{ needs.discover.outputs.nix_conf }} | ||
|
||
build_packages: | ||
needs: discover | ||
needs: [discover, check_tests] | ||
if: fromJSON(needs.discover.outputs.hits).packages.build != '{}' | ||
strategy: | ||
fail-fast: false | ||
|
@@ -87,7 +87,7 @@ jobs: | |
extra_nix_config: ${{ needs.discover.outputs.nix_conf }} | ||
|
||
build_shells: | ||
needs: discover | ||
needs: [discover, check_tests] | ||
if: fromJSON(needs.discover.outputs.hits).shells.build != '{}' | ||
strategy: | ||
fail-fast: false | ||
|
@@ -105,3 +105,43 @@ jobs: | |
nix_cache: s3://cache.divnix.com?endpoint=fra1.digitaloceanspaces.com | ||
discovery_json: ${{ toJSON(matrix.target) }} | ||
extra_nix_config: ${{ needs.discover.outputs.nix_conf }} | ||
|
||
check_tests: | ||
needs: discover | ||
if: fromJSON(needs.discover.outputs.hits).checks.check != '{}' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: ${{ fromJSON(needs.discover.outputs.hits).checks.check }} | ||
name: //${{ matrix.target.cell }}/${{ matrix.target.block }}/${{ matrix.target.name }}:${{ matrix.target.action }} | ||
runs-on: ${{ inputs.runs-on }} | ||
steps: | ||
- name: Install Nix Early (to update subflake references) | ||
uses: nixbuild/nix-quick-install-action@v22 | ||
with: | ||
nix_conf: | | ||
experimental-features = nix-command flakes | ||
accept-flake-config = true | ||
- uses: actions/checkout@v3 | ||
- name: Update subflake references | ||
run: | | ||
# create the store path of | ||
nix store add-path --name source . | ||
# update the subflake lockfile to the (now existing) store path | ||
# set lastModified to 1 because unknown issues in the GH action environment | ||
(cd ./src/local && nix flake lock --update-input std && ( | ||
jq '.nodes.std.locked.lastModified = 1' flake.lock > flake.lock.new && rm flake.lock && mv flake.lock.new flake.lock | ||
) && git add -f flake.lock) | ||
(cd ./src/tests && nix flake lock --update-input std && ( | ||
jq '.nodes.std.locked.lastModified = 1' flake.lock > flake.lock.new && rm flake.lock && mv flake.lock.new flake.lock | ||
) &&git add -f flake.lock) | ||
# continue normally ... | ||
- uses: divnix/std-action/[email protected] | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET }} | ||
with: | ||
nix_signing_key: ${{ secrets.NIX_KEY }} | ||
nix_cache: s3://cache.divnix.com?endpoint=fra1.digitaloceanspaces.com | ||
discovery_json: ${{ toJSON(matrix.target) }} | ||
extra_nix_config: ${{ needs.discover.outputs.nix_conf }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[check] | ||
cmd = ["nix", "eval", ".#checks.snapshots"] | ||
cmd = ["nix", "eval", ".#checks.snapshots.check"] | ||
|
||
[eval] | ||
cmd = ["nix", "eval", ".#checks.snapshots"] | ||
cmd = ["nix", "eval", ".#checks.snapshots.check"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
let | ||
inherit (inputs) namaka self; | ||
inputs' = builtins.removeAttrs inputs ["self"]; | ||
in { | ||
inherit inputs; | ||
snapshots = namaka.lib.load { | ||
src = self + /tests; | ||
inputs = builtins.removeAttrs inputs ["self"]; | ||
snapshots = { | ||
meta.description = "The main Standard Snapshotting test suite"; | ||
check = namaka.lib.load { | ||
src = self + /tests; | ||
inputs = inputs' // {inputs = inputs';}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pretty | ||
{ | ||
arion = "/nix/store/8px6k532a5fvz0k7ckhj3kfyqxbhz317-source"; | ||
blank = "/nix/store/scflkbbsqxlzxvja3gm4xf1y2kvsww32-source"; | ||
cells = "no .outPath"; | ||
devshell = "/nix/store/gadmzrrq2dygvzy3yqp5x7gfbd7l2pw1-source"; | ||
dmerge = "/nix/store/8b67fxqldqv1x3x07nhabb9ild2zl6rz-source"; | ||
haumea = "/nix/store/ih873qmabdsdgk1naaiv6v7jy1mxq241-source"; | ||
incl = "/nix/store/4dqlpd9c8yil4ay4prr38vslxhpsp4zp-source"; | ||
makes = "/nix/store/71rzg7vs53gmxqph64d9zqf4ns928c6c-source"; | ||
microvm = "/nix/store/v5za7dzczgcvfvqgcm80qari3msyhw6b-source"; | ||
n2c = "/nix/store/rgd4s5ylv38p94wi6vays6wc1a0l5iyf-source"; | ||
namaka = "/nix/store/xgzvi3baaaz9lpymfv6f1fgxfmy0ygvv-source"; | ||
nixago = "/nix/store/cys15p6lyyhj85bk4bckn82waih2l945-source"; | ||
nixpkgs = "/nix/store/yf26s7734ql7q05zlq6nq4y5q3rjyhj7-source"; | ||
paisano = "/nix/store/ypilc1pa3g7ycrsg9rq41cfqappsdxqk-source"; | ||
paisano-tui = "/nix/store/w5wg8h6506raj0qxwal4w8hg7iwchnv5-source"; | ||
yants = "/nix/store/np6pvhkza8grv26qypzpibwrrg7kqxkc-source"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{inputs}: | ||
builtins.mapAttrs (n: v: | ||
if v ? outPath | ||
then builtins.unsafeDiscardStringContext (toString v) | ||
else "no .outPath") | ||
# std is too volatile as long as suflakes aren't solved | ||
(builtins.removeAttrs inputs ["std"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"pretty" |