Update docker-test.yaml #43
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: Docker Image Integration Test | |
on: | |
registry_package: | |
types: [ published ] | |
push: | |
branches: [ feature/docker-image ] | |
jobs: | |
tests: | |
# Only run after 'reference.bookingsystem' is published | |
# if: ${{ github.event.package.name == 'reference.bookingsystem' }} | |
runs-on: ubuntu-latest | |
container: node:14.17.0 | |
services: | |
# Label used to access the service container | |
reference.bookingsystem: | |
# Docker Hub image | |
image: ghcr.io/openactive/reference.bookingsystem:latest # ${{ github.event.package.package_version.version }} | |
# Config for postgres | |
env: | |
ASPNETCORE_ENVIRONMENT: all-features | |
ApplicationHostBaseUrl: http://reference.bookingsystem | |
OpenIdIssuerUrl: http://reference.bookingsystem.identity | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd "curl -f http://localhost/OpenActive" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 80:80 | |
# Label used to access the service container | |
reference.bookingsystem.identity: | |
# Docker Hub image | |
image: ghcr.io/openactive/reference.bookingsystem.identity:latest # ${{ github.event.package.package_version.version }} | |
# Config for postgres | |
env: | |
ASPNETCORE_ENVIRONMENT: all-features | |
ApplicationHostBaseUrl: http://reference.bookingsystem.identity | |
Urls: '' | |
ASPNETCORE_URLS: '' | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd "curl -f http://localhost/.well-known/openid-configuration" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Run OpenActive Test Suite | |
uses: openactive/openactive-test-suite@latest | |
with: | |
NODE_CONFIG: | | |
{"broker": {"outputPath": "/github/workspace/output/", "datasetSiteUrl": "http://reference.bookingsystem/openactive"}, "integrationTests": { "outputPath": "/github/workspace/output/", "useRandomOpportunities": true }, "sellers": {"primary": { "@id": "http://reference.bookingsystem/api/identifiers/sellers/1","authentication": {"requestHeaders": {"X-OpenActive-Test-Seller-Id": "http://reference.bookingsystem/api/identifiers/sellers/1"}}},"secondary": { "@id": "http://reference.bookingsystem/api/identifiers/sellers/2","authentication": {"requestHeaders": {"X-OpenActive-Test-Seller-Id": "http://reference.bookingsystem/api/identifiers/sellers/2"}}}}} | |
NODE_ENV: .example.all-features | |
NODE_APP_INSTANCE: ci | |
- name: Upload test output as artifact | |
uses: actions/upload-artifact@v4 | |
if: ${{ success() || failure() }} | |
with: | |
name: docker-test | |
path: ./output/ |