dagd-test #1456
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: dagd-test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
schedule: | |
- cron: 0 12 * * * | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
continue-on-error: ${{ matrix.soft_fail }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- dockerfile: rhel8 | |
soft_fail: false | |
- dockerfile: stream9 | |
soft_fail: true | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Start docker-compose | |
env: | |
GOOGLE_INSIGHTS_API: ${{ secrets.GOOGLE_INSIGHTS_API }} | |
run: | | |
pushd container | |
sed -i 's/build: ci-dockerfiles.*/build: ci-dockerfiles\/${{ matrix.dockerfile }}/' docker-compose.yaml | |
docker-compose up -d | |
popd | |
- name: Wait for database initialization | |
run: | | |
while [[ ! -f .ready-for-ci ]]; do | |
echo 'waiting for docker-compose to spin up' | |
sleep 1 | |
done | |
- name: Run php --info | |
run: php --info | |
- name: Run dagd-test | |
env: | |
DaGdConfigFile: ../container/config.container.php | |
run: ./tests/dagd-test -u http://localhost:8080 | |
# We should extend dagd-test to cover CLI stuff, but for now we test | |
# dagd-admin separately as part of CI. | |
- name: Run dagd-admin tests | |
env: | |
DaGdConfigFile: ../container/config.container.php | |
GOOGLE_INSIGHTS_API: ${{ secrets.GOOGLE_INSIGHTS_API }} | |
run: | | |
docker exec container_app_1 ./scripts/dagd-admin g | grep State | grep enabled | |
docker exec container_app_1 ./scripts/dagd-admin g | grep Accesses: | grep 7d | |
docker exec container_app_1 ./scripts/dagd-admin g | grep "defaulting to \-\-status" | |
docker exec container_app_1 ./scripts/dagd-admin g -d | grep "Updated in" | |
docker exec container_app_1 ./scripts/dagd-admin g | grep State | grep disabled | |
docker exec container_app_1 ./scripts/dagd-admin g -e | grep "Updated in" | |
docker exec container_app_1 ./scripts/dagd-admin g | grep State | grep enabled | |
docker exec container_app_1 ./scripts/dagd-admin g -r https://wikipedia.org/ | grep "Updated in" | |
docker exec container_app_1 ./scripts/dagd-admin g -S | grep wikipedia | |
docker exec container_app_1 ./scripts/dagd-admin g -r https://google.com/ | grep "Updated in" | |
- name: Check production site SSL expiry (within 5 days) | |
run: | | |
echo | | |
openssl s_client -connect da.gd:443 | | |
openssl x509 -checkend $((60*60*24*5)) -noout |