Skip to content

Test updates #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VSAC_API_KEY=#ReplaceMe
COMPOSE_PROJECT_NAME=rems_demo
VSAC_API_KEY=#ReplaceMe
293 changes: 154 additions & 139 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,140 +1,155 @@
name: Playwright Tests
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
workflow_dispatch:
inputs:
rems-setup-branch:
description: 'rems set up branch'
required: true
default: 'dev'
rems-intermediary-branch:
description: 'rems intermediary branch'
required: true
default: 'dev'
request-generator-branch:
description: 'request generator branch'
required: true
default: 'dev'
pims-branch:
description: 'pims branch'
required: true
default: 'dev'
rems-admin-branch:
description: 'rems admin branch'
required: true
default: 'dev'
rems-smart-on-fhir-branch:
description: 'rems smart on fhir branch'
required: true
default: 'dev'
rems-test-ehr-branch:
description: 'rems test-ehr branch'
required: true
default: 'dev'

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Output Workflow Inputs
run: |
echo 'Input Variables (defaults to main if not specified):'
echo 'rems set up branch: ${{ github.event.inputs.rems-setup-branch }}'
echo 'rems intermediary branch: ${{ github.event.inputs.rems-intermediary-branch }}'
echo 'test ehr branch: ${{ github.event.inputs.rems-test-ehr-branch }}'
echo 'request generator branch: ${{ github.event.inputs.request-generator-branch }}'
echo 'rems admin branch: ${{ github.event.inputs.rems-admin-branch }}'
echo 'pims branch: ${{ github.event.inputs.pims-branch }}'
echo 'rems smart on fhir branch: ${{ github.event.inputs.rems-smart-on-fhir-branch }}'


- name: Checkout rems-setup
uses: actions/checkout@v4
with:
repository: mcode/rems-setup
path: rems-setup
ref: ${{ github.event.inputs.rems-setup-branch }}

- name: Checkout rems-intermediary repo
uses: actions/checkout@v4
with:
repository: mcode/rems-intermediary
path: rems-intermediary
submodules: true
ref: ${{ github.event.inputs.rems-intermediary-branch }}


- name: Checkout test-ehr repo
uses: actions/checkout@v4
with:
repository: mcode/test-ehr
path: test-ehr
ref: ${{ github.event.inputs.rems-test-ehr-branch }}

- name: Checkout request-generator repo
uses: actions/checkout@v4
with:
repository: mcode/request-generator
path: request-generator
ref: ${{ github.event.inputs.request-generator-branch }}

- name: Checkout rems-admin repo
uses: actions/checkout@v4
with:
repository: mcode/rems-admin
path: rems-admin
submodules: true
ref: ${{ github.event.inputs.rems-admin-branch }}

- name: Checkout pims repo
uses: actions/checkout@v4
with:
repository: mcode/pims
path: pims
ref: ${{ github.event.inputs.pims-branch }}

- name: Checkout rems-smart-on-fhir repo
uses: actions/checkout@v4
with:
repository: mcode/rems-smart-on-fhir
path: rems-smart-on-fhir
submodules: true
ref: ${{ github.event.inputs.rems-smart-on-fhir-branch }}

- name: Build containers
run: docker compose -f docker-compose-local-build.yml build --no-cache --pull
working-directory: ./rems-setup
env:
VSAC_API_KEY: ${{secrets.VSAC_API_KEY}}

- name: Start containers
run: docker compose -f docker-compose-local-build.yml up -d --wait --force-recreate
working-directory: ./rems-setup
env:
VSAC_API_KEY: ${{secrets.VSAC_API_KEY}}
# name: Playwright Tests
# on:
# push:
# branches: [ main, dev ]
# pull_request:
# branches: [ main, dev ]
# workflow_dispatch:
# inputs:
# rems-setup-branch:
# description: 'rems set up branch'
# required: true
# default: 'dev'
# rems-intermediary-branch:
# description: 'rems intermediary branch'
# required: true
# default: 'dev'
# request-generator-branch:
# description: 'request generator branch'
# required: true
# default: 'dev'
# pims-branch:
# description: 'pims branch'
# required: true
# default: 'dev'
# rems-admin-branch:
# description: 'rems admin branch'
# required: true
# default: 'dev'
# rems-smart-on-fhir-branch:
# description: 'rems smart on fhir branch'
# required: true
# default: 'dev'
# rems-test-ehr-branch:
# description: 'rems test-ehr branch'
# required: true
# default: 'dev'
# rems-directory-branch:
# description: 'rems directory branch'
# required: true
# default: 'dev'

# jobs:
# test:
# runs-on: ubuntu-latest
# steps:
# - name: Output Workflow Inputs
# run: |
# echo 'Input Variables (defaults to main if not specified):'
# echo 'rems set up branch: ${{ github.event.inputs.rems-setup-branch }}'
# echo 'rems intermediary branch: ${{ github.event.inputs.rems-intermediary-branch }}'
# echo 'test ehr branch: ${{ github.event.inputs.rems-test-ehr-branch }}'
# echo 'request generator branch: ${{ github.event.inputs.request-generator-branch }}'
# echo 'rems admin branch: ${{ github.event.inputs.rems-admin-branch }}'
# echo 'pims branch: ${{ github.event.inputs.pims-branch }}'
# echo 'rems smart on fhir branch: ${{ github.event.inputs.rems-smart-on-fhir-branch }}'
# echo 'rems smart on directory branch: ${{ github.event.inputs.rems-directory-branch }}'



# - name: Checkout rems-setup
# uses: actions/checkout@v4
# with:
# repository: mcode/rems-setup
# path: rems-setup
# ref: ${{ github.event.inputs.rems-setup-branch }}

# - name: Checkout rems-intermediary repo
# uses: actions/checkout@v4
# with:
# repository: mcode/rems-intermediary
# path: rems-intermediary
# submodules: true
# ref: ${{ github.event.inputs.rems-intermediary-branch }}


# - name: Checkout rems-directory repo
# uses: actions/checkout@v4
# with:
# repository: mcode/rems-directory
# path: rems-directory
# submodules: true
# ref: ${{ github.event.inputs.rems-directory-branch }}


# - name: Checkout test-ehr repo
# uses: actions/checkout@v4
# with:
# repository: mcode/test-ehr
# path: test-ehr
# ref: ${{ github.event.inputs.rems-test-ehr-branch }}

# - name: Checkout request-generator repo
# uses: actions/checkout@v4
# with:
# repository: mcode/request-generator
# path: request-generator
# ref: ${{ github.event.inputs.request-generator-branch }}

# - name: Checkout rems-admin repo
# uses: actions/checkout@v4
# with:
# repository: mcode/rems-admin
# path: rems-admin
# submodules: true
# ref: ${{ github.event.inputs.rems-admin-branch }}

# - name: Checkout pims repo
# uses: actions/checkout@v4
# with:
# repository: mcode/pims
# path: pims
# ref: ${{ github.event.inputs.pims-branch }}

# - name: Checkout rems-smart-on-fhir repo
# uses: actions/checkout@v4
# with:
# repository: mcode/rems-smart-on-fhir
# path: rems-smart-on-fhir
# submodules: true
# ref: ${{ github.event.inputs.rems-smart-on-fhir-branch }}

# - name: Build containers
# run: docker compose -f docker-compose-local-build.yml build --no-cache --pull
# working-directory: ./rems-setup
# env:
# VSAC_API_KEY: ${{secrets.VSAC_API_KEY}}

# - name: Start containers
# run: docker compose -f docker-compose-local-build.yml up -d --wait --force-recreate
# working-directory: ./rems-setup
# env:
# VSAC_API_KEY: ${{secrets.VSAC_API_KEY}}

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci
working-directory: ./rems-setup

- name: Install Playwright Browsers
run: npx playwright install --with-deps
working-directory: ./rems-setup

- name: Run Playwright tests
run: npx playwright test
working-directory: ./rems-setup

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: ./rems-setup/playwright-report/
retention-days: 30
# - uses: actions/setup-node@v3
# with:
# node-version: 18

# - name: Install dependencies
# run: npm ci
# working-directory: ./rems-setup

# - name: Install Playwright Browsers
# run: npx playwright install --with-deps
# working-directory: ./rems-setup

# - name: Run Playwright tests
# run: npx playwright test
# working-directory: ./rems-setup

# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: playwright-report
# path: ./rems-setup/playwright-report/
# retention-days: 30
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Complete end-to-end set up guides for the REMS Proof of Concept prototype are li
We use Playwright for end-to-end testing, which automates running the full prototype environment.

1. Install dependencies: `npm install`
2. Run all tests: `npx playwright test` or with the `-ui` flag to view them in the Chromium browser.
2. Run all tests: `npx playwright test` or with the `--ui` flag to view them in the Chromium browser.

## Sequence Diagram

Expand Down
2 changes: 2 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ services:
ports:
- "3323:3323"
- "3324:3324"
env_file:
- ../rems-directory/.env
environment:
REMS_ADMIN_1_URL: http://rems-administrator:8090/
REMS_ADMIN_2_URL: http://rems-administrator2:8095/
Expand Down
2 changes: 2 additions & 0 deletions docker-compose-local-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ services:
build:
context: ../rems-directory
container_name: rems_dev_rems-directory
env_file:
- ../rems-directory/.env
ports:
- "3323:3323"
- "3324:4424"
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ services:
build:
image: codexrems/rems-directory:1.3
container_name: rems_prod_rems-directory
env_file:
- ../rems-directory/.env
ports:
- "3323:3323"
environment:
Expand Down
Loading