Skip to content

Commit 7199ce6

Browse files
committed
Change ci.yml to split docker build and test runs.
1 parent 82e4098 commit 7199ce6

1 file changed

Lines changed: 82 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 82 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,101 @@
33
# For more information see:
44
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
55

6-
name: CI
6+
name: Solid Test Suites
77

88
on:
99
push:
1010
branches:
11-
- main
12-
- cleanup/ci
11+
- main
12+
- cleanup/ci # @TODO: Remove this before merging to main
1313
pull_request:
1414
branches: [ main ]
1515

1616
jobs:
17-
build:
17+
docker-build-pub-sub:
18+
runs-on: ubuntu-latest
1819

19-
runs-on: ${{ matrix.os }}
20+
steps:
21+
- uses: actions/checkout@v3
22+
23+
- name: Build Pub-Sub Docker image
24+
run: |
25+
docker build -t pubsub-server https://github.com/pdsinterop/php-solid-pubsub-server.git#main
26+
docker push ghcr.io/pdsinterop/solid-nextcloud:latest
27+
28+
docker-build-nextcloud:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
33+
- name: Build Solid-Nextcloud Docker image
34+
run: |
35+
docker build -t solid-nextcloud .
36+
docker push ghcr.io/pdsinterop/php-solid-pubsub-server:latest
37+
38+
run-tests:
39+
needs:
40+
- docker-build-nextcloud
41+
- docker-build-pub-sub
2042

21-
strategy:
22-
matrix:
23-
os: [ ubuntu-latest ]
43+
runs-on: ubuntu-latest
2444

2545
steps:
2646
- uses: actions/checkout@v3
2747

28-
- name: Setup Solid test suite
29-
shell: 'script -q -e -c "bash {0}"'
30-
run: >-
48+
- name: Run Solid webid-provider test suite
49+
run: |
50+
docker pull michielbdejong/nextcloud-cookie
51+
docker pull solidtestsuite/webid-provider-tests:v2.1.0
52+
53+
docker network create testnet
54+
docker run --network=testnet -d --name pubsub ghcr.io/pdsinterop/php-solid-pubsub-server:latest
55+
3156
source ./run-solid-test-suite.sh
32-
&& setup
33-
&& startPubSub
34-
&& startSolidNextcloud server
35-
&& startSolidNextcloud thirdparty
36-
37-
- name: Run the Solid test suite
38-
shell: 'script -q -e -c "bash {0}"'
39-
run: >-
57+
startSolidNextcloud 'server' 'ghcr.io/pdsinterop/solid-nextcloud'
58+
startSolidNextcloud 'thirdparty' 'ghcr.io/pdsinterop/solid-nextcloud'
59+
60+
docker run --rm --network=testnet \
61+
--env COOKIE="$COOKIE_server" \
62+
--env COOKIE_ALICE="$COOKIE_server" \
63+
--env COOKIE_BOB="$COOKIE_thirdparty" \
64+
--env-file ./env-vars-testers.list \
65+
solidtestsuite/webid-provider-tests:v2.1.0
66+
67+
- name: Run Solid solid-crud test suite
68+
run: |
69+
docker pull michielbdejong/nextcloud-cookie
70+
docker pull solidtestsuite/solid-crud-tests:v6.0.0
71+
72+
docker network create testnet
73+
docker run --network=testnet -d --name pubsub ghcr.io/pdsinterop/php-solid-pubsub-server:latest
74+
75+
source ./run-solid-test-suite.sh
76+
startSolidNextcloud 'server' 'ghcr.io/pdsinterop/solid-nextcloud'
77+
startSolidNextcloud 'thirdparty' 'ghcr.io/pdsinterop/solid-nextcloud'
78+
79+
docker run --rm --network=testnet \
80+
--env COOKIE="$COOKIE_server" \
81+
--env COOKIE_ALICE="$COOKIE_server" \
82+
--env COOKIE_BOB="$COOKIE_thirdparty" \
83+
--env-file ./env-vars-testers.list \
84+
solidtestsuite/solid-crud-tests:v6.0.0
85+
86+
- name: Run Solid web-access-control test suite
87+
run: |
88+
docker pull michielbdejong/nextcloud-cookie
89+
docker pull solidtestsuite/web-access-control-tests:v7.1.0
90+
91+
docker network create testnet
92+
docker run --network=testnet -d --name pubsub ghcr.io/pdsinterop/php-solid-pubsub-server:latest
93+
4094
source ./run-solid-test-suite.sh
41-
&& runTests webid-provider
42-
&& runTests solid-crud
43-
&& runTests web-access-control
95+
startSolidNextcloud 'server' 'ghcr.io/pdsinterop/solid-nextcloud'
96+
startSolidNextcloud 'thirdparty' 'ghcr.io/pdsinterop/solid-nextcloud'
97+
98+
docker run --rm --network=testnet \
99+
--env COOKIE="$COOKIE_server" \
100+
--env COOKIE_ALICE="$COOKIE_server" \
101+
--env COOKIE_BOB="$COOKIE_thirdparty" \
102+
--env-file ./env-vars-testers.list \
103+
solidtestsuite/web-access-control-tests:v7.1.0

0 commit comments

Comments
 (0)