Test #23
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: Tests | |
on: | |
push: | |
branches: | |
- proof-of-concept | |
concurrency: | |
group: test-${{ github.ref }} | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
PLATFORM_BRANCH: main | |
DATABASE_NAME: test | |
DATABASE_USER: test | |
PLATFORM_PROJECT_ID: rasrzs7pi6sd4 | |
PLATFORMSH_CLI_NO_INTERACTION: 1 | |
PLATFORMSH_CLI_TOKEN: ${{ secrets.PLATFORMSH_CLI_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: nationalarchives/ds-etna-frontend | |
path: frontend | |
- uses: actions/checkout@v4 | |
with: | |
repository: nationalarchives/ds-wagtail | |
path: cms | |
- uses: actions/checkout@v4 | |
with: | |
repository: nationalarchives/ds-etna-search | |
path: search | |
- name: Install Platform.sh CLI | |
run: | | |
cd cms | |
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | bash | |
platform | |
platform db:dump -p $PLATFORM_PROJECT_ID -e $PLATFORM_BRANCH -f dump.psql | |
- name: Start CMS | |
run: | | |
cd cms | |
touch .env | |
docker compose up db -d | |
docker compose exec db psql -d $DATABASE_NAME -U $DATABASE_USER < dump.psql | |
platform mount:download -e $PLATFORM_BRANCH -p $PLATFORM_PROJECT_ID -m media --target=media --exclude='/images/*' --yes | |
# docker compose exec cli chmod -fR 777 media | |
docker compose up web -d | |
- name: Start frontend | |
run: | | |
cd frontend | |
docker compose up app -d | |
- uses: nev7n/wait_for_response@v1 | |
with: | |
url: http://localhost:65535/healthcheck/live/ | |
- name: Check | |
run: > | |
curl --silent http://localhost:65535/browse/ | grep '<h1 class="tna-heading-xl">Explore 1,000 years of history</h1>' | |
- uses: nev7n/wait_for_response@v1 | |
with: | |
url: http://localhost:8000/healthcheck/live/ | |
# - name: Check | |
# run: > | |
# curl --silent http://localhost:65535/ | grep 'something' | |
- name: Start search | |
run: | | |
cd search | |
docker compose up app -d | |
- uses: nev7n/wait_for_response@v1 | |
with: | |
url: http://localhost:65534/healthcheck/live/ | |
- name: Check | |
run: > | |
curl --silent http://localhost:65534/docs | grep '<title>ETNA Search API - Swagger UI</title>' |