Skip to content

v1.2.4 release

v1.2.4 release #116

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main, develop ]
paths-ignore:
# Any update here needs to be done for
# - `pull_request` see below
- '*.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/pull_request_template.md'
- '.github/stale.yml'
- 'LICENSE'
- 'Postman/**'
pull_request:
branches: [ main, develop ]
types: [opened, synchronize, reopened]
paths-ignore:
# Any update here needs to be done for
# - `push`see before
- '*.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/pull_request_template.md'
- '.github/stale.yml'
- 'LICENSE'
- 'Postman/**'
env:
buildConfiguration: 'Release'
buildRuntime: 'win-x64'
runEnvironment: 'Release'
ASPNETCORE_ENVIRONMENT: 'Release'
jobs:
build-and-test:
runs-on: ubuntu-latest
## NOTE: This workflow needs to also checkout the Mock Register for testing.
## This workflow will checkout the ConsumerDataRight/mock-register project
steps:
- name: Checkout Data Recipient
uses: actions/checkout@v2
with:
path: ./mock-data-recipient
- name: Pull Mock Register Image (main)
if: ${{ github.ref == 'refs/heads/main' }}
run: |
docker pull consumerdataright/mock-register:main
docker image tag consumerdataright/mock-register:main mock-register:latest
- name: Pull Mock Register Image (develop)
if: ${{ github.ref != 'refs/heads/main' }}
run: |
docker pull consumerdataright/mock-register:develop
docker image tag consumerdataright/mock-register:develop mock-register:latest
- name: Pull Mock Data Holder Image (main)
if: ${{ github.ref == 'refs/heads/main' }}
run: |
docker pull consumerdataright/mock-data-holder:main
docker image tag consumerdataright/mock-data-holder:main mock-data-holder:latest
- name: Pull Mock Data Holder Image (develop)
if: ${{ github.ref != 'refs/heads/main' }}
run: |
docker pull consumerdataright/mock-data-holder:develop
docker image tag consumerdataright/mock-data-holder:develop mock-data-holder:latest
- name: Pull Mock Data Holder Energy Image (main)
if: ${{ github.ref == 'refs/heads/main' }}
run: |
docker pull consumerdataright/mock-data-holder-energy:main
docker image tag consumerdataright/mock-data-holder-energy:main mock-data-holder-energy:latest
- name: Pull Mock Data Holder Energy Image (develop)
if: ${{ github.ref != 'refs/heads/main' }}
run: |
docker pull consumerdataright/mock-data-holder-energy:develop
docker image tag consumerdataright/mock-data-holder-energy:develop mock-data-holder-energy:latest
- name: List contents
if: always()
run: |
ls
cd mock-data-recipient
ls
cd ..
# Build mock-data-recipient image
- name: Build the mock-data-recipient image
run: |
docker build ./mock-data-recipient/Source --file ./mock-data-recipient/Source/Dockerfile --tag mock-data-recipient:latest
# Build mock-data-recipient-integration-tests image
- name: Build the mock-data-recipient-integration-tests image
run: |
docker build ./mock-data-recipient/Source --file ./mock-data-recipient/Source/Dockerfile.integration-tests --tag mock-data-recipient-integration-tests:latest
# Run integration tests
- name: Run integration tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.IntegrationTests.yml' up --abort-on-container-exit --exit-code-from mock-data-recipient-integration-tests
# Remove integration tests
- name: Remove integration tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.IntegrationTests.yml' down
# List docker images
- name: List Docker images
run: |
docker images
# Build mock-data-recipient-e2e-tests image
- name: Build the mock-data-recipient-e2e-tests image
run: |
docker build ./mock-data-recipient/Source --file ./mock-data-recipient/Source/Dockerfile.e2e-tests --tag mock-data-recipient-e2e-tests:latest
# Run e2e tests
- name: Run e2e tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.E2ETests.yml' up --abort-on-container-exit --exit-code-from mock-data-recipient-e2e-tests
# Remove e2e tests
- name: Remove e2e tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.E2ETests.yml' down
# Build mock-data-recipient-unit-tests image
- name: Build the mock-data-recipient-unit-tests image
run: |
docker build ./mock-data-recipient/Source --file ./mock-data-recipient/Source/Dockerfile.unit-tests --tag mock-data-recipient-unit-tests:latest
# Run unit tests
- name: Run unit tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.UnitTests.yml' up --abort-on-container-exit --exit-code-from mock-data-recipient-unit-tests
# Remove unit tests
- name: Remove unit tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.UnitTests.yml' down
# Archive unit test results
- name: Archive unit test results
uses: actions/upload-artifact@v2
if: always()
with:
name: unit-test-results
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-recipient-unit-tests/testresults
# Archive integration test results
- name: Archive integration test results
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-results
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-recipient-integration-tests/testresults
# Archive e2e test results
- name: Archive e2e test results
uses: actions/upload-artifact@v2
if: always()
with:
name: e2e-test-results
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-recipient-e2e-tests/testresults
# Archive mock data recipient logs
- name: Archive mock data recipient logs
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-artifacts
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-recipient/tmp
# Archive mock data holder logs
- name: Archive mock data holder logs
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-artifacts
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-holder/tmp
# Archive mock data holder energy logs
- name: Archive mock data holder energy logs
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-artifacts
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-holder-energy/tmp
# Archive mock register logs
- name: Archive mock register logs
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-artifacts
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-register/tmp