Skip to content

Update docker-test.yaml #38

Update docker-test.yaml

Update docker-test.yaml #38

Workflow file for this run

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: ''
# 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@d7cbdac7f03ce75f282927fe67c9a375f1e440a8
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@v2
if: ${{ success() || failure() }}
with:
name: docker-test
path: ./output/