Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions nix/test/smoke.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ else
"curl -s http://localhost:${envVars.SERVER_PORT}/api/v1/jobs"
)

# The server may create matrix jobs on startup for new compilers, so we just verify
# the response is valid JSON (starts with '[')
# Verify the response is valid JSON (starts with '[').
assert result.strip().startswith("["), f"Expected JSON array, got: {result}"

# Verify the database was created and migrations ran
Expand Down Expand Up @@ -107,6 +106,17 @@ else
mkdir -p ${stateDir}
echo 'DHALL_TYPES=/defunct/types' > ${stateDir}/.env
${testConfig.setupGitFixtures}/bin/setup-git-fixtures ${repoFixturesDir}

# Smoke tests cover deployment, not compiler rollouts. Record the test
# compilers in this copy of Prelude without changing integration fixtures.
compilers=$(${(pkgs.extend testConfig.testOverlay).registry-purs-versions}/bin/purs-versions)
prelude=${repoFixturesDir}/purescript/registry/metadata/prelude.json
${pkgs.jq}/bin/jq --arg compilers "$compilers" \
'.published[].compilers = ($compilers | split(" "))' "$prelude" > "$prelude.tmp"
mv "$prelude.tmp" "$prelude"
${pkgs.git}/bin/git -C ${repoFixturesDir}/purescript/registry \
-c user.name=pacchettibotti -c user.email=pacchettibotti@purescript.org \
commit -am "Record test compilers for smoke test"
'';
};

Expand Down
Loading