Skip to content

project: memory lane #21

project: memory lane

project: memory lane #21

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: 20.18.0
NODE_ENV: test
jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: ./service/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: ./service
- name: Run unit tests
run: npm test
working-directory: ./service
e2e:
name: E2E Tests
runs-on: ubuntu-latest
needs: test # Runs only after unit tests pass
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
cache-dependency-path: ./app/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: ./app
- name: Run Cypress tests (Headless)
uses: cypress-io/github-action@v6
with:
working-directory: ./app
start: npm run dev
wait-on: "http://localhost:3000"
browser: chrome