Skip to content

Switch to github workflows #2

Switch to github workflows

Switch to github workflows #2

Workflow file for this run

name: ci
on:
push:
branches: [master]
release:
types: [created]
pull_request:
branches: [master]
permissions: read-all
jobs:
build:
uses: miracum/.github/.github/workflows/standard-build.yaml@40fda6d89054cbb816af5784a5edf2346dcf3e62 # v1.0.4
permissions:
contents: read
id-token: write
packages: write
pull-requests: write
actions: read
security-events: write
with:
enable-build-test-layer: false
enable-upload-test-image: false
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-22.04
needs:
- build
steps:
- name: "Checkout code"
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false
- name: Download build image
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
if: ${{ github.event_name == 'pull_request' }}
with:
name: container-image
path: /tmp
- name: load image
if: ${{ github.event_name == 'pull_request' }}
run: |
ls -lsa /tmp
docker load --input /tmp/image.tar
docker image ls
- name: Run E2E tests
env:
FHIR_GATEWAY_IMAGE_NAME: "${{ fromJson(needs.build.outputs.image-meta-json).tags[0] }}"
run: |
docker compose -p e2e -f deploy/docker-compose.yml -f deploy/docker-compose.gw-deps.yml -f tests/e2e/docker-compose.yml --project-directory=tests/e2e build
docker compose -p e2e -f deploy/docker-compose.yml -f deploy/docker-compose.gw-deps.yml --project-directory=tests/e2e up -d
docker compose -p e2e -f deploy/docker-compose.yml -f deploy/docker-compose.gw-deps.yml -f tests/e2e/docker-compose.yml --project-directory=tests/e2e run tester
- name: Print E2E logs
env:
FHIR_GATEWAY_IMAGE_NAME: "${{ fromJson(needs.build.outputs.image-meta-json).tags[0] }}"
if: ${{ always() }}
run: |
docker compose -p e2e -f deploy/docker-compose.yml -f deploy/docker-compose.gw-deps.yml -f tests/e2e/docker-compose.yml logs
docker compose -p e2e -f deploy/docker-compose.yml -f deploy/docker-compose.gw-deps.yml -f tests/e2e/docker-compose.yml down --volumes --remove-orphans
lint:
uses: miracum/.github/.github/workflows/standard-lint.yaml@40fda6d89054cbb816af5784a5edf2346dcf3e62 # v1.0.4
permissions:
contents: read
pull-requests: write
issues: write
security-events: write
actions: read
with:
codeql-languages: '["java", "python"]'
enable-codeql: true
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
release:
uses: miracum/.github/.github/workflows/standard-release.yaml@40fda6d89054cbb816af5784a5edf2346dcf3e62 # v1.0.4
needs:
- build
- test
permissions:
contents: write
pull-requests: write
issues: write
secrets:
semantic-release-token: ${{ secrets.MIRACUM_BOT_SEMANTIC_RELEASE_TOKEN }}