Skip to content

Address #65

Address #65 #24

name: PHP8.2 RC13.11.4
on:
push:
branches: main
workflow_dispatch:
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: AndrewPoppe/redcap_source
ref: v13.11.4_zip
token: ${{ secrets.REPOS_TOKEN }}
persist-credentials: false
- name: Build the REDCap Image
run: |
git clone https://github.com/AndrewPoppe/redcap-docker-compose.git
cd redcap-docker-compose/rdc
sed 's|\(DOCKER_PREFIX\)=.*|\1=rc13_php7.4|' .env-example |
sed 's|\(TZ\)=.*|\1=America/New_York|' |
sed 's|\(WEB_PORT\)=.*|\1=13740|' |
sed 's|\(MYSQL_PORT\)=.*|\1=13746|' |
sed 's|\(PHPMYADMIN_PORT\)=.*|\1=13741|' |
sed 's|\(MAILHOG_PORT\)=.*|\1=13745|' > .env
- name: Start Docker REDCap Container
working-directory: ./redcap-docker-compose/rdc
run: docker-compose up -d
- uses: actions/checkout@v3
with:
path: security_access_groups
- name: Move REDCap Source File
run: mv redcap13.11.4.zip security_access_groups/tests/playwright/setup/
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
working-directory: ./security_access_groups/tests/playwright
run: npm install
- name: Install Playwright Browsers
working-directory: ./security_access_groups/tests/playwright
run: npx playwright install --with-deps
- name: Initialize REDCap
working-directory: ./security_access_groups/tests/playwright/setup
run: |
sed -i 's|ZIPFILE|redcap13.11.4.zip|' installREDCap.js
node installREDCap.js
- uses: actions/upload-artifact@v3
if: always()
with:
name: setup
path: ./security_access_groups/tests/playwright/setup/screenshots
retention-days: 30
- name: Move module files
run: |
sudo chmod -R 777 ./redcap-docker-compose/www/modules
mv ./security_access_groups ./redcap-docker-compose/www/modules/security_access_groups_v99
- name: Run Playwright tests
working-directory: ./redcap-docker-compose/www/modules/security_access_groups_v99/tests/playwright
run: |
sed -i 's|redcapVersion:.*|redcapVersion: "redcap_v13.11.4",|' fixtures/config.js
npx playwright test
- uses: actions/upload-artifact@v3
if: failure()
with:
name: playwright-report
path: ./redcap-docker-compose/www/modules/security_access_groups_v99/tests/playwright/playwright-report/
retention-days: 30
- uses: actions/upload-artifact@v3
if: success()
with:
name: test-results
path: ./redcap-docker-compose/www/modules/security_access_groups_v99/tests/playwright/test-results/
retention-days: 30