This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
forked from CommunitySolidServer/CommunitySolidServer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from mrvahedi68/mrv/test-suite
[WIP] Adding solid test suite to GitHub actions
- Loading branch information
Showing
3 changed files
with
85 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# This configuration file was automatically generated by Gitpod. | ||
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) | ||
# and commit this file to your remote git repository to share the goodness with others. | ||
|
||
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart | ||
|
||
tasks: | ||
- init: npm install && npm run build | ||
command: npm run start | ||
|
||
|
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,59 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
export SKIP_CONC=1 | ||
|
||
function setup { | ||
npm ci | ||
npm start -- --detectOpenHandles &> '/dev/null' & | ||
git clone https://github.com/solid-contrib/solid-crud-tests.git | ||
cd solid-crud-tests | ||
git checkout v6.0.0 | ||
npm ci | ||
cd .. | ||
git clone https://github.com/solid-contrib/web-access-control-tests.git | ||
cd web-access-control-tests | ||
#git fetch origin | ||
#git checkout run-against-css | ||
git pull | ||
npm ci | ||
rm run-against-css.sh | ||
cp ../test/surface/web-access-control-tests.sh run-against-css.sh | ||
chmod +x run-against-css.sh | ||
cd .. | ||
} | ||
|
||
function runThirdParty { | ||
npm start -- --port 3001 --detectOpenHandles & | ||
} | ||
|
||
function waitForCss { | ||
until curl -kI http://localhost:$1 2> /dev/null | ||
do | ||
echo Waiting for CSS to start on port $1, this can take up to a minute ... | ||
sleep 1 | ||
done | ||
} | ||
|
||
function teardown { | ||
kill $(lsof -t -i :3000) | ||
kill $(lsof -t -i :3001) | ||
rm -rf solid-crud-tests web-access-control-tests | ||
} | ||
|
||
function runTests { | ||
cd $1 | ||
./run-against-css.sh | ||
cd .. | ||
} | ||
|
||
# ... | ||
teardown || true | ||
setup | ||
waitForCss 3000 | ||
runTests solid-crud-tests | ||
# runThirdParty | ||
# waitForCss 3001 | ||
# runTests web-access-control-tests | ||
teardown | ||
|
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,15 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
export WEBID_ALICE=http://localhost:3000/profile/card#me | ||
export OIDC_ISSUER_ALICE=http://localhost:3000 | ||
export STORAGE_ROOT_ALICE=http://localhost:3000/ | ||
export WEBID_BOB=http://localhost:30001/profile/card#me | ||
export OIDC_ISSUER_BOB=http://localhost:30001 | ||
export STORAGE_ROOT_BOB=http://localhost:30001/ | ||
|
||
|
||
# npm run jest "$@" | ||
# DEBUG=* | ||
export INCLUDE_MAY=1 | ||
npm run jest |