adds cypress to the UI #5
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: Lagoon UI CI | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
format-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: yarn | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Formatting check | |
run: | | |
yarn prettier@2.8.7 @trivago/prettier-plugin-sort-imports | |
yarn prettier --check --config .prettierrc | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Linting | |
run: | | |
yarn tsc | |
yarn eslint -- src/ | |
cypress-tests: | |
runs-on: ubuntu-latest | |
needs: [format-check, lint] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3.1 | |
with: | |
node-version: '16' | |
- name: Build and start Lagoon-minimal | |
run: | | |
cd test | |
make up | |
- name: Run Cypress Tests | |
uses: cypress-io/github-action@v6 | |
with: | |
config-file: ./cypress/cypress.config.ts | |
auto-cancel-after-failures: 1 | |
build: yarn build && GRAPHQL_API=http://0.0.0.0:33000/graphql KEYCLOAK_API=http://0.0.0.0:38088/auth yarn start | |
command: yarn cypress:runAll | |
- name: Stop Docker containers | |
run: | | |
cd test | |
make down |