Skip to content

O3-2996: Add billing module to openmrs distro pom file and spa config #58

O3-2996: Add billing module to openmrs distro pom file and spa config

O3-2996: Add billing module to openmrs distro pom file and spa config #58

name: Run E2E Tests on PRs and Commits
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and Run Containers
run: docker compose -f e2e_test_support_files/docker-compose-build.yml up -d
- name: Wait for the backend to start
run: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost/openmrs/login.htm)" != "200" ]]; do sleep 10; done
- name: Commit and export Containers
run: sh e2e_test_support_files/commit_and_export_images.sh
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: e2e_release_env_images
path: e2e_release_env_images.tar.gz
retention-days: 1
run-patient-management-e2e-tests:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Create Temporary Directory to Download Docker Images
id: tempdir
run: echo "tmpdir=$(mktemp -d)" >> "$GITHUB_OUTPUT"
- name: Download Docker Images
uses: actions/download-artifact@v4
with:
name: e2e_release_env_images
path: ${{ steps.tempdir.outputs.tmpdir }}
- name: Load Docker Images
run: |
gzip -d ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar.gz
docker load --input ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar
docker image ls -a
- name: Spin up an OpenMRS Instance
run: docker compose up -d
working-directory: e2e_test_support_files
- name: Checkout to the repo's main branch
uses: actions/checkout@v4
with:
repository: openmrs/openmrs-esm-patient-management
ref: main
path: e2e_repo
- name: Copy test environment variables
run: cp example.env .env
working-directory: e2e_repo
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable
working-directory: e2e_repo
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
working-directory: e2e_repo
- name: Wait for the OpenMRS instance to start
run: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/openmrs/login.htm)" != "200" ]]; do sleep 10; done
- name: Run E2E tests
run: yarn playwright test
working-directory: e2e_repo
- name: Upload Report
uses: actions/upload-artifact@v4
if: always()
with:
name: report-patient-management
path: e2e_repo/playwright-report/
retention-days: 30
run-patient-chart-e2e-tests:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Create Temporary Directory to Download Docker Images
id: tempdir
run: echo "tmpdir=$(mktemp -d)" >> "$GITHUB_OUTPUT"
- name: Download Docker Images
uses: actions/download-artifact@v4
with:
name: e2e_release_env_images
path: ${{ steps.tempdir.outputs.tmpdir }}
- name: Load Docker Images
run: |
gzip -d ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar.gz
docker load --input ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar
docker image ls -a
- name: Spin up an OpenMRS Instance
run: docker compose up -d
working-directory: e2e_test_support_files
- name: Checkout to the repo's main branch
uses: actions/checkout@v4
with:
repository: openmrs/openmrs-esm-patient-chart
ref: main
path: e2e_repo
- name: Copy test environment variables
run: cp example.env .env
working-directory: e2e_repo
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable
working-directory: e2e_repo
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
working-directory: e2e_repo
- name: Wait for the OpenMRS instance to start
run: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/openmrs/login.htm)" != "200" ]]; do sleep 10; done
- name: Run E2E tests
run: yarn playwright test
working-directory: e2e_repo
- name: Upload Report
uses: actions/upload-artifact@v4
if: always()
with:
name: report-patient-chart
path: e2e_repo/playwright-report/
retention-days: 30
run-form-builder-e2e-tests:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Create Temporary Directory to Download Docker Images
id: tempdir
run: echo "tmpdir=$(mktemp -d)" >> "$GITHUB_OUTPUT"
- name: Download Docker Images
uses: actions/download-artifact@v4
with:
name: e2e_release_env_images
path: ${{ steps.tempdir.outputs.tmpdir }}
- name: Load Docker Images
run: |
gzip -d ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar.gz
docker load --input ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar
docker image ls -a
- name: Spin up an OpenMRS Instance
run: docker compose up -d
working-directory: e2e_test_support_files
- name: Checkout to the repo's main branch
uses: actions/checkout@v4
with:
repository: openmrs/openmrs-esm-form-builder
ref: main
path: e2e_repo
- name: Copy test environment variables
run: cp example.env .env
working-directory: e2e_repo
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable
working-directory: e2e_repo
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
working-directory: e2e_repo
- name: Wait for the OpenMRS instance to start
run: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/openmrs/login.htm)" != "200" ]]; do sleep 10; done
- name: Run E2E tests
run: yarn playwright test
working-directory: e2e_repo
- name: Upload Report
uses: actions/upload-artifact@v4
if: always()
with:
name: report-form-builder
path: e2e_repo/playwright-report/
retention-days: 30
run-esm-core-e2e-tests:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Create Temporary Directory to Download Docker Images
id: tempdir
run: echo "tmpdir=$(mktemp -d)" >> "$GITHUB_OUTPUT"
- name: Download Docker Images
uses: actions/download-artifact@v4
with:
name: e2e_release_env_images
path: ${{ steps.tempdir.outputs.tmpdir }}
- name: Load Docker Images
run: |
gzip -d ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar.gz
docker load --input ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar
docker image ls -a
- name: Spin up an OpenMRS Instance
run: docker compose up -d
working-directory: e2e_test_support_files
- name: Checkout to the repo's main branch
uses: actions/checkout@v4
with:
repository: openmrs/openmrs-esm-core
ref: main
path: e2e_repo
- name: Copy test environment variables
run: cp example.env .env
working-directory: e2e_repo
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable
working-directory: e2e_repo
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
working-directory: e2e_repo
- name: Wait for the OpenMRS instance to start
run: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/openmrs/login.htm)" != "200" ]]; do sleep 10; done
- name: Run E2E tests
run: yarn playwright test
working-directory: e2e_repo
- name: Upload Report
uses: actions/upload-artifact@v4
if: always()
with:
name: report-esm-core
path: e2e_repo/playwright-report/
retention-days: 30
run-cohort-builder-e2e-tests:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Create Temporary Directory to Download Docker Images
id: tempdir
run: echo "tmpdir=$(mktemp -d)" >> "$GITHUB_OUTPUT"
- name: Download Docker Images
uses: actions/download-artifact@v4
with:
name: e2e_release_env_images
path: ${{ steps.tempdir.outputs.tmpdir }}
- name: Load Docker Images
run: |
gzip -d ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar.gz
docker load --input ${{ steps.tempdir.outputs.tmpdir }}/e2e_release_env_images.tar
docker image ls -a
- name: Spin up an OpenMRS Instance
run: docker compose up -d
working-directory: e2e_test_support_files
- name: Checkout to the repo's main branch
uses: actions/checkout@v4
with:
repository: openmrs/openmrs-esm-cohortbuilder
ref: main
path: e2e_repo
- name: Copy test environment variables
run: cp example.env .env
working-directory: e2e_repo
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable
working-directory: e2e_repo
- name: Install Playwright Browsers
run: npx playwright install chromium --with-deps
working-directory: e2e_repo
- name: Wait for the OpenMRS instance to start
run: while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/openmrs/login.htm)" != "200" ]]; do sleep 10; done
- name: Run E2E tests
run: yarn playwright test
working-directory: e2e_repo
- name: Upload Report
uses: actions/upload-artifact@v4
if: always()
with:
name: report-cohort-builder
path: e2e_repo/playwright-report/
retention-days: 30