fix changed login test #14
Workflow file for this run
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: End-to-end tests | ||
on: | ||
c: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- main | ||
- release | ||
- dev | ||
types: | ||
- opened | ||
- reopened | ||
jobs: | ||
cypress-run: | ||
runs-on: ubuntu-22.04 | ||
# container: | ||
# image: cypress/included | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Cache Docker image | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/cypress.tar | ||
key: cypress-image-${{ hashFiles('**/Dockerfile') }} | ||
- name: Load cached Docker image | ||
run: | | ||
if [ -f /tmp/cypress.tar ]; then | ||
docker load -i /tmp/cypress.tar | ||
else | ||
docker pull cypress/included | ||
docker save cypress/included > /tmp/cypress.tar | ||
fi | ||
- name: Cache node modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: frontend/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
run: | | ||
cd frontend | ||
npm install -g yarn --force | ||
yarn install | ||
- name: Cache build outputs | ||
uses: actions/cache@v3 | ||
with: | ||
path: frontend/build | ||
key: ${{ runner.os }}-build-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-build- | ||
- name: Start server | ||
run: | | ||
cd frontend | ||
yarn build | ||
yarn start & | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
working-directory: frontend |