|
9 | 9 | pull_request: |
10 | 10 | branches: [ main ] |
11 | 11 |
|
| 12 | +# Cancels all previous workflow runs for the same branch that have not yet completed. |
| 13 | +concurrency: |
| 14 | + # The concurrency group contains the workflow name and the branch name. |
| 15 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 16 | + cancel-in-progress: true |
| 17 | + |
12 | 18 | jobs: |
| 19 | + # @TODO: Instead of building the docker image here, take a pre-build image and mount the code (only build when the Dockerfile changes) |
13 | 20 | docker-build-nextcloud: |
14 | 21 | runs-on: ubuntu-latest |
15 | 22 | steps: |
|
27 | 34 | docker build -t "ghcr.io/pdsinterop/solid-nextcloud:latest" . |
28 | 35 | docker push "ghcr.io/pdsinterop/solid-nextcloud:latest" |
29 | 36 |
|
30 | | - # @TODO: Instead of duplicating this code 3 times, use a matrix? |
31 | | - test-webid-provider: |
| 37 | + tests: |
| 38 | + strategy: |
| 39 | + fail-fast: false |
| 40 | + matrix: |
| 41 | + test: |
| 42 | + - 'solidtestsuite/solid-crud-tests:v6.0.0' |
| 43 | + - 'solidtestsuite/web-access-control-tests:v7.1.0' |
| 44 | + - 'solidtestsuite/webid-provider-tests:v2.1.0' |
| 45 | + |
32 | 46 | needs: |
33 | 47 | - docker-build-nextcloud |
34 | 48 |
|
|
46 | 60 | - name: Run Solid webid-provider test suite |
47 | 61 | run: | |
48 | 62 | docker pull michielbdejong/nextcloud-cookie |
49 | | - docker pull solidtestsuite/webid-provider-tests:v2.1.0 |
| 63 | + docker pull ${{ matrix.test }} |
50 | 64 | docker pull ghcr.io/pdsinterop/solid-nextcloud:latest |
51 | 65 | docker pull ghcr.io/pdsinterop/php-solid-pubsub-server:latest |
52 | 66 |
|
|
62 | 76 | --env COOKIE_ALICE="$COOKIE_server" \ |
63 | 77 | --env COOKIE_BOB="$COOKIE_thirdparty" \ |
64 | 78 | --env-file ./env-vars-testers.list \ |
65 | | - solidtestsuite/webid-provider-tests:v2.1.0 |
66 | | -
|
67 | | - test-solid-crud: |
68 | | - needs: |
69 | | - - docker-build-nextcloud |
70 | | - |
71 | | - runs-on: ubuntu-latest |
72 | | - |
73 | | - steps: |
74 | | - - uses: actions/checkout@v3 |
75 | | - |
76 | | - - uses: docker/login-action@v2 |
77 | | - with: |
78 | | - registry: ghcr.io |
79 | | - username: ${{ github.actor }} |
80 | | - password: ${{ secrets.GITHUB_TOKEN }} |
81 | | - |
82 | | - - name: Run Solid solid-crud test suite |
83 | | - run: | |
84 | | - docker pull michielbdejong/nextcloud-cookie |
85 | | - docker pull solidtestsuite/solid-crud-tests:v6.0.0 |
86 | | -
|
87 | | - docker network create testnet |
88 | | - docker run -i --network=testnet -d --name pubsub ghcr.io/pdsinterop/php-solid-pubsub-server:latest |
89 | | -
|
90 | | - source ./run-solid-test-suite.sh |
91 | | - startSolidNextcloud 'server' "ghcr.io/pdsinterop/solid-nextcloud:latest" |
92 | | - startSolidNextcloud 'thirdparty' "ghcr.io/pdsinterop/solid-nextcloud:latest" |
93 | | -
|
94 | | - docker run -i --rm --network=testnet \ |
95 | | - --env COOKIE="$COOKIE_server" \ |
96 | | - --env COOKIE_ALICE="$COOKIE_server" \ |
97 | | - --env COOKIE_BOB="$COOKIE_thirdparty" \ |
98 | | - --env-file ./env-vars-testers.list \ |
99 | | - solidtestsuite/solid-crud-tests:v6.0.0 |
100 | | -
|
101 | | - test-web-access-control: |
102 | | - needs: |
103 | | - - docker-build-nextcloud |
104 | | - |
105 | | - runs-on: ubuntu-latest |
106 | | - |
107 | | - steps: |
108 | | - - uses: actions/checkout@v3 |
109 | | - |
110 | | - - uses: docker/login-action@v2 |
111 | | - with: |
112 | | - registry: ghcr.io |
113 | | - username: ${{ github.actor }} |
114 | | - password: ${{ secrets.GITHUB_TOKEN }} |
115 | | - |
116 | | - - name: Run Solid web-access-control test suite |
117 | | - run: | |
118 | | - docker pull michielbdejong/nextcloud-cookie |
119 | | - docker pull solidtestsuite/web-access-control-tests:v7.1.0 |
120 | | -
|
121 | | - docker network create testnet |
122 | | - docker run -i --network=testnet -d --name 'pubsub' "ghcr.io/pdsinterop/php-solid-pubsub-server:latest" |
123 | | -
|
124 | | - source ./run-solid-test-suite.sh |
125 | | - startSolidNextcloud 'server' "ghcr.io/pdsinterop/solid-nextcloud:latest" |
126 | | - startSolidNextcloud 'thirdparty' "ghcr.io/pdsinterop/solid-nextcloud:latest" |
127 | | -
|
128 | | - docker run -i --rm --network=testnet \ |
129 | | - --env COOKIE="$COOKIE_server" \ |
130 | | - --env COOKIE_ALICE="$COOKIE_server" \ |
131 | | - --env COOKIE_BOB="$COOKIE_thirdparty" \ |
132 | | - --env-file ./env-vars-testers.list \ |
133 | | - solidtestsuite/web-access-control-tests:v7.1.0 |
| 79 | + ${{ matrix.test }} |
0 commit comments