Skip to content

Cypress qa work

Cypress qa work #6

Workflow file for this run

name: Cypress OE QA workflows
on:
push:
branches: [ '2.8' ]
pull_request:
branches: [ '2.8' ]
workflow_dispatch:
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout dataexport module
uses: actions/checkout@v2
with:
repository: I-TECH-UW/dataexport
ref: develop
- name: install dataexport module
run: mvn clean install
- name: Checkout OpenELIS-Global2
uses: actions/checkout@v3
with:
repository: ${{github.repository}}
- name: Build OpenELIS-Global2
run: mvn clean install
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Install dependencies
run: npm install
working-directory: react-ui
- name: Install React scripts
run: npm install [email protected] -g
working-directory: react-ui
- name: Cypress install
uses: cypress-io/github-action@v3
with:
working-directory: react-ui
runTests: false
build: npm run build
- name: Save build folder
uses: actions/upload-artifact@v3
with:
name: build
if-no-files-found: error
working-directory: react-ui/build
- name: Run OpenELS image
run: docker-compose -f build.docker-compose.yml up -d
- name: Sleep for 3 minutes for OpenELIS to start
run: sleep 3m
shell: bash
cypress-run:
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download the build folder
uses: actions/download-artifact@v3
with:
name: build
working-directory: react-ui/build
- name: Cypress run
uses: cypress-io/github-action@v3
with:
working-directory: react-ui
start: npm start
browser: chrome