Skip to content

Commit

Permalink
Add cypress to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hdescottes committed Aug 6, 2023
1 parent a246c9c commit 1f84578
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ on:
push:
branches:
- master
- feat/Implements_cypress

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
Expand All @@ -36,10 +37,10 @@ jobs:
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Use Node 16.x
- name: Use Node 18.x
uses: actions/setup-node@v1
with:
node-version: '16.x'
node-version: '18.x'
cache: npm
- name: Install dependencies
run: npm install -D puppeteer karma-chrome-launcher --save-dev @babel/preset-typescript
Expand All @@ -49,4 +50,18 @@ jobs:
working-directory: app-ui
- name: Test
run: npm test --no-watch --no-progress --browsers=ChromeHeadlessCI
working-directory: app-ui
working-directory: app-ui

cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v5
with:
working-directory: app-ui
build: npm run build
start: npm start

0 comments on commit 1f84578

Please sign in to comment.