File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed
Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,25 @@ jobs:
2222
2323 steps :
2424 - uses : actions/checkout@v4
25+
26+ # extract repository name
27+ - if : github.event_name == 'pull_request'
28+ run : echo "REPO_NAME=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
29+
30+ - if : github.event_name != 'pull_request'
31+ run : echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_ENV
32+
2533 # extract branch name
2634 - if : github.event_name == 'pull_request'
2735 run : echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
36+
2837 - if : github.event_name != 'pull_request'
2938 run : echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
3039
40+ # print repository name
41+ - name : Get repository name
42+ run : echo 'The repository name is' $REPO_NAME
43+
3144 # print branch name
3245 - name : Get branch name
3346 run : echo 'The branch name is' $BRANCH_NAME
4558 - run : npm pack .
4659 - run : npm install -g solid-server-*.tgz
4760 # Run the Solid test-suite
48- - run : bash test/surface/run-solid-test-suite.sh $BRANCH_NAME
61+ - run : bash test/surface/run-solid-test-suite.sh $BRANCH_NAME $REPO_NAME
4962
5063 # TODO: The pipeline should automate publication to npm, so that the docker build gets the correct version
5164 # This job will only dockerize solid-server@latest / solid-server@<tag-name> from npmjs.com!
Original file line number Diff line number Diff line change 11FROM node:latest
22ARG BRANCH=main
3+ ARG REPO=nodeSolidServer/node-solid-server
34RUN echo Testing branch ${BRANCH} of NSS
4- RUN git clone https://github.com/nodeSolidServer/node-solid-server
5+ RUN git clone https://github.com/${REPO}
56WORKDIR node-solid-server
67RUN git checkout ${BRANCH}
78RUN git status
Original file line number Diff line number Diff line change 33
44function setup {
55 echo Branch name: $1
6+ echo Repoitory: $2
67 docker network create testnet
7- docker build -t server --build-arg BRANCH=$1 test/surface/docker/server
8+ docker build -t server --build-arg BRANCH=$1 --build-arg REPO= $2 test/surface/docker/server
89 docker build -t cookie test/surface/docker/cookie
910 docker run -d --env-file test/surface/server-env.list --name server --network=testnet -v ` pwd` :/travis -w /node-solid-server server /travis/bin/solid-test start --config-file /node-solid-server/config.json
1011 docker run -d --env-file test/surface/thirdparty-env.list --name thirdparty --network=testnet -v ` pwd` /test/surface:/surface server /node-solid-server/bin/solid-test start --config-file /surface/thirdparty-config.json
@@ -32,7 +33,7 @@ function waitForNss {
3233
3334function runTests {
3435 docker pull solidtestsuite/$1 :$2
35-
36+
3637 echo " Running $1 against server with cookie $COOKIE_server "
3738 docker run --rm --network=testnet \
3839 --env COOKIE=" $COOKIE_server " \
@@ -54,7 +55,7 @@ function runTestsFromGit {
5455
5556# ...
5657teardown || true
57- setup $1
58+ setup $1 $2
5859waitForNss server
5960runTests webid-provider-tests v2.0.3
6061runTestsFromGit solid-crud-tests v6.0.0-issue#1743
@@ -72,4 +73,3 @@ teardown
7273# --env COOKIE_BOB="$COOKIE_thirdparty" \
7374# --env-file test/surface/web-access-control-tests-env.list \
7475# solidtestsuite/web-access-control-tests:latest /bin/bash
75-
You can’t perform that action at this time.
0 commit comments