Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Monster
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Javascript
Monster
Commits
5cd7bbb0
Verified
Commit
5cd7bbb0
authored
1 year ago
by
Volker Schukai
Browse files
Options
Downloads
Patches
Plain Diff
fix: wip web tests
parent
db50aa5e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
flake.nix
+2
-2
2 additions, 2 deletions
flake.nix
nix/scripts/run-ci-tests.nix
+0
-3
0 additions, 3 deletions
nix/scripts/run-ci-tests.nix
nix/scripts/run-ci-web-tests.nix
+36
-0
36 additions, 0 deletions
nix/scripts/run-ci-web-tests.nix
with
38 additions
and
5 deletions
flake.nix
+
2
−
2
View file @
5cd7bbb0
...
@@ -106,13 +106,13 @@
...
@@ -106,13 +106,13 @@
gitlab
=
let
gitlab
=
let
ciJobToken
=
builtins
.
getEnv
"CI_JOB_TOKEN"
;
ciJobToken
=
builtins
.
getEnv
"CI_JOB_TOKEN"
;
script-run-ci-tests
=
pkgs
'
.
callPackage
./nix/scripts/run-ci-tests.nix
{};
script-run-ci-tests
=
pkgs
'
.
callPackage
./nix/scripts/run-ci-tests.nix
{};
script-run-web-tests
=
pkgs
'
.
callPackage
./nix/scripts/run-web-tests.nix
{};
script-run-
ci-
web-tests
=
pkgs
'
.
callPackage
./nix/scripts/run-
ci-
web-tests.nix
{};
gitlabPackages
=
with
pkgs
'
;[
gitlabPackages
=
with
pkgs
'
;[
nodejs_21
nodejs_21
git
git
script-run-ci-tests
script-run-ci-tests
script-run-web-tests
script-run-
ci-
web-tests
];
];
in
in
pkgs
'
.
mkShell
{
pkgs
'
.
mkShell
{
...
...
This diff is collapsed.
Click to expand it.
nix/scripts/run-ci-tests.nix
+
0
−
3
View file @
5cd7bbb0
...
@@ -10,9 +10,6 @@
...
@@ -10,9 +10,6 @@
exit 1
exit 1
fi
fi
set -x
${
pkgs
.
coreutils
}
/bin/printenv
cd
''$
{CI_PROJECT_DIR} || exit 1
cd
''$
{CI_PROJECT_DIR} || exit 1
echo "This script will run tests in the project working directory:
''$
{CI_PROJECT_DIR}"
echo "This script will run tests in the project working directory:
''$
{CI_PROJECT_DIR}"
...
...
This diff is collapsed.
Click to expand it.
nix/scripts/run-ci-web-tests.nix
0 → 100644
+
36
−
0
View file @
5cd7bbb0
{
pkgs
,
lib
,
...
}:
let
in
pkgs
.
writeShellScriptBin
"run-web-tests"
''
echo "run ci web tests"
if [ -z "
''$
{CI_JOB_TOKEN}" ]; then
echo "You are in a CI environment, this shell is not intended for CI, but for local development"
exit 1
fi
cd
''$
{CI_PROJECT_DIR} || exit 1
echo "This script will run tests in the project working directory:
''$
{CI_PROJECT_DIR}"
echo "The command is executed in the current working directory and not in a nix derivation."
TEST_CASES_PATH="
''$
{CI_PROJECT_DIR}/test/web/"
if !
${
pkgs
.
corepack
}
/bin/pnpm install
then
echo "Failed to install dependencies"
exit 1
fi
if !
${
pkgs
.
nodejs_21
}
/bin/node "
''$
{TEST_CASES_PATH}/puppeteer.mjs" --browser
${
pkgs
.
ungoogled-chromium
}
/bin/chromium --path "
''$
{TEST_CASES_PATH}/test.html"
then
echo_fail "Tests failed, check your JS!"
exit 1
fi
exit 0
''
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment