Skip to content

Merge pull request #32 from Djiit/dependabot/npm_and_yarn/overpass-ql… #67

Merge pull request #32 from Djiit/dependabot/npm_and_yarn/overpass-ql…

Merge pull request #32 from Djiit/dependabot/npm_and_yarn/overpass-ql… #67

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit-test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Run test suites
run: pnpm run test
e2e-test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- id: playwright-cache-key
run: |
CACHE_KEYS=$(cat package.json | jq -r '.devDependencies."@playwright/test" | sub("\\^(?<x>[0-9].[0-9]*.[0-9]+)"; "\(.x)")')
echo "cache-key=$CACHE_KEYS" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-cache-key.outputs.cache-key }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
if: ${{ !steps.playwright-cache.outputs.cache-hit }}
run: pnpm exec playwright install --with-deps
- name: Build app
run: pnpm run build
- name: Run Playwright tests
run: pnpm run test:e2e
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30