|
1 | 1 | name: Playwright Tests |
2 | 2 | on: |
3 | 3 | push: |
4 | | - branches: [ main, master ] |
| 4 | + branches: [ main, dev, tagging-docker-compose ] |
5 | 5 | pull_request: |
6 | | - branches: [ main, master ] |
| 6 | + branches: [ main, dev, tagging-docker-compose ] |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + rems-setup-branch: |
| 10 | + description: 'rems set up branch' |
| 11 | + required: true |
| 12 | + default: 'main' |
| 13 | + request-generator-branch: |
| 14 | + description: 'request generator branch' |
| 15 | + required: true |
| 16 | + default: 'main' |
| 17 | + pims-branch: |
| 18 | + description: 'pims branch' |
| 19 | + required: true |
| 20 | + default: 'main' |
| 21 | + rems-admin-branch: |
| 22 | + description: 'rems admin branch' |
| 23 | + required: true |
| 24 | + default: 'main' |
| 25 | + rems-smart-on-fhir-branch: |
| 26 | + description: 'rems smart on fhir branch' |
| 27 | + required: true |
| 28 | + default: 'main' |
| 29 | + rems-test-ehr-branch: |
| 30 | + description: 'rems test-ehr branch' |
| 31 | + required: true |
| 32 | + default: 'main' |
| 33 | + |
7 | 34 | jobs: |
8 | 35 | test: |
9 | | - # timeout-minutes: 60 |
10 | 36 | runs-on: ubuntu-latest |
11 | 37 | steps: |
12 | | - - uses: actions/checkout@v3 |
13 | | - - uses: actions/setup-node@v3 |
14 | | - with: |
15 | | - node-version: 18 |
16 | | - - name: Install dependencies |
17 | | - run: npm ci |
18 | | - - name: Install Playwright Browsers |
19 | | - run: npx playwright install --with-deps |
20 | | - # - name: Run Playwright tests |
21 | | - # run: npx playwright test |
22 | | - # - uses: actions/upload-artifact@v3 |
23 | | - # if: always() |
24 | | - # with: |
25 | | - # name: playwright-report |
26 | | - # path: playwright-report/ |
27 | | - # retention-days: 30 |
| 38 | + - name: Checkout |
| 39 | + uses: actions/checkout@v4 |
| 40 | + with: |
| 41 | + repository: mcode/rems-setup |
| 42 | + path: rems-setup |
| 43 | + ref: ${{ github.event.inputs.rems-setup-branch }} |
| 44 | + |
| 45 | + - name: Checkout test-ehr repo |
| 46 | + uses: actions/checkout@v4 |
| 47 | + with: |
| 48 | + repository: mcode/test-ehr |
| 49 | + path: test-ehr |
| 50 | + ref: ${{ github.event.inputs.rems-test-ehr-branch }} |
| 51 | + |
| 52 | + - name: Checkout request-generator repo |
| 53 | + uses: actions/checkout@v4 |
| 54 | + with: |
| 55 | + repository: mcode/request-generator |
| 56 | + path: request-generator |
| 57 | + ref: ${{ github.event.inputs.request-generator-branch }} |
| 58 | + |
| 59 | + - name: Checkout rems-admin repo |
| 60 | + uses: actions/checkout@v4 |
| 61 | + with: |
| 62 | + repository: mcode/rems-admin |
| 63 | + path: rems-admin |
| 64 | + submodule: true |
| 65 | + ref: ${{ github.event.inputs.rems-admin-branch }} |
| 66 | + |
| 67 | + - name: Checkout pims repo |
| 68 | + uses: actions/checkout@v4 |
| 69 | + with: |
| 70 | + repository: mcode/pims |
| 71 | + path: pims |
| 72 | + ref: ${{ github.event.inputs.pims-branch }} |
| 73 | + |
| 74 | + - name: Checkout rems-smart-on-fhir repo |
| 75 | + uses: actions/checkout@v4 |
| 76 | + with: |
| 77 | + repository: mcode/rems-smart-on-fhir |
| 78 | + path: rems-smart-on-fhir |
| 79 | + submodule: true |
| 80 | + ref: ${{ github.event.inputs.rems-smart-on-fhir-branch }} |
| 81 | + |
| 82 | + - name: Start containers |
| 83 | + run: docker-compose -f docker-compose-local-build.yml up -d --wait |
| 84 | + |
| 85 | + - uses: actions/setup-node@v3 |
| 86 | + with: |
| 87 | + node-version: 18 |
| 88 | + - name: Install dependencies |
| 89 | + run: npm ci |
| 90 | + - name: Install Playwright Browsers |
| 91 | + run: npx playwright install --with-deps |
| 92 | + - name: Run Playwright tests |
| 93 | + run: npx playwright test |
| 94 | + - uses: actions/upload-artifact@v3 |
| 95 | + if: always() |
| 96 | + with: |
| 97 | + name: playwright-report |
| 98 | + path: playwright-report/ |
| 99 | + retention-days: 30 |
0 commit comments