Skip to content

Commit

Permalink
ci: add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
garrappachc committed Jul 30, 2024
1 parent d948b51 commit 2e62934
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: tests
on:
push:
branches:
- 'master'
- 'renovate/**'
tags:
- '*.*.*'
pull_request:
branches:
- 'master'

jobs:
unit-tests:
name: unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Run unit tests
run: pnpm test

e2e-tests:
name: end to end
services:
mongo:
image: mongo:latest
ports:
- 27017:27017

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Install Playwright Browsers
run: npx playwright install --with-deps

- name: Run Playwright tests
run: pnpm test:e2e

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30

0 comments on commit 2e62934

Please sign in to comment.