Skip to content

Feat/create and delete shopping lists #55

Feat/create and delete shopping lists

Feat/create and delete shopping lists #55

Workflow file for this run

name: Run tests
on:
# push:
# branches:
# - main
pull_request:
branches:
- main
paths-ignore:
- "technical-document/**"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: app
- name: Install dependencies
working-directory: app
run: pnpm install
- name: Lint code
working-directory: app
run: pnpm lint
- name: Check code
working-directory: app
run: pnpm check
- name: Run unit tests
working-directory: app
run: pnpm test:unit
- name: Get installed Playwright version
working-directory: app
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(node -e "const YAML = require('yaml'); const file = fs.readFileSync('./pnpm-lock.yaml', 'utf-8'); console.log(YAML.parse(file).devDependencies['@playwright/test'].version)")" >> $GITHUB_ENV
- name: Cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Install playwright browsers
working-directory: app
run: pnpm exec playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: Run integration tests
working-directory: app
run: pnpm test:integration