-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (60 loc) · 2.84 KB
/
docker-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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@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/