Remove yarn from github action #1266
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cypress tests | |
on: | |
push: | |
paths: | |
- 'daikoku/app/**' | |
- 'daikoku/javascript/**' | |
- '.github/workflows/front-office-tests.yml' | |
workflow_dispatch: | |
jobs: | |
cypress-run: | |
name: Cypress run | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_DB: daikoku_test | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
# install node lts | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: latest | |
cache: 'npm' | |
- uses: coursier/cache-action@v5 | |
- name: initialize backend build | |
run: | | |
cd daikoku | |
sbt ';clean;compile' | |
- name: Installing dependencies | |
run: | | |
cd daikoku/javascript | |
rm -rf node_modules/ | |
npm install | |
- name: build javascript | |
run: | | |
cd daikoku/javascript | |
npm run build | |
env: | |
NODE_OPTIONS: --max_old_space_size=4096 | |
- name: Cypress run and publish report | |
uses: cypress-io/github-action@v2 | |
env: | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
with: | |
browser: chrome | |
headless: true | |
start: npm run cypress:start:backend | |
wait-on: 'http://localhost:9000' | |
command: npm run test:cypress | |
working-directory: daikoku/javascript |