Skip to content

Set up e2e tests

Set up e2e tests #6

Workflow file for this run

name: Checks
env:
NODE_VERSION: 18.16.1
on:
push:
branches:
- main
pull_request:
jobs:
format-lint:
name: Format check, lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
with:
main-branch-name: 'main'
- run: npm i -f
- run: npx nx format:check
- run: npx nx affected -t lint --parallel=3
cypress-run:
name: End-to-end tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Checkout
uses: actions/checkout@v4
with:
repository: geonetwork/geonetwork-ui
path: './geonetwork-ui'
- name: Build the gn-ui backend
run: sudo docker-compose -f geonetwork-ui/support-services/docker-compose.yml up -d init
- name: Install dependencies
run: npm i -f
- name: Run tests
run: npx nx e2e mel-datahub-e2e