SNAPSHOT bump #6310
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
name: HTTP-tests | |
on: push | |
jobs: | |
http-tests: | |
name: Build Docker image and run HTTP test suite against it | |
runs-on: ubuntu-latest | |
env: | |
ASF_ARCHIVE: http://archive.apache.org/dist/ | |
JENA_VERSION: 4.7.0 | |
BASE_URI: https://localhost:4443/ | |
OWNER_CERT_PWD: changeit | |
SECRETARY_CERT_PWD: LinkedDataHub | |
steps: | |
- name: Install Linux packages | |
run: sudo apt-get update && sudo apt-get install -qq raptor2-utils && sudo apt-get install curl | |
- name: Download Jena | |
run: curl -sS --fail "${{env.ASF_ARCHIVE}}jena/binaries/apache-jena-${{env.JENA_VERSION}}.tar.gz" -o "${{runner.temp}}/jena.tar.gz" | |
- name: Unpack Jena | |
run: tar -zxf jena.tar.gz | |
working-directory: ${{runner.temp}} | |
- run: echo "$JENA_HOME/bin" >> $GITHUB_PATH | |
env: | |
JENA_HOME: "${{runner.temp}}/apache-jena-${{env.JENA_VERSION}}" | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Generate owner's and secretary's certificates/public keys | |
run: ../scripts/setup.sh .env ssl "${{env.OWNER_CERT_PWD}}" "${{env.SECRETARY_CERT_PWD}}" 3650 | |
shell: bash | |
working-directory: http-tests | |
- name: Build Docker image & Run Docker containers | |
run: docker-compose -f docker-compose.yml -f ./http-tests/docker-compose.http-tests.yml --env-file ./http-tests/.env up --build -d | |
- name: Wait for the server to start... | |
run: while ! (status=$(curl -k -s -w "%{http_code}\n" https://localhost:4443 -o /dev/null) && echo "$status" && echo "$status" | grep "403") ; do sleep 1 ; done # wait for the webapp to start (returns 403 by default) | |
- name: Run HTTP test scripts | |
run: ./run.sh "$PWD/ssl/owner/cert.pem" "${{env.OWNER_CERT_PWD}}" "$PWD/ssl/secretary/cert.pem" "${{env.SECRETARY_CERT_PWD}}" | |
shell: bash | |
working-directory: http-tests | |
- name: Stop Docker containers | |
run: docker-compose --env-file ./http-tests/.env down | |
- name: Remove Docker containers | |
run: docker-compose --env-file ./http-tests/.env rm -f |