test(chat): fix e2e tests #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: [opened, synchronize] | ||
jobs: | ||
test: | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
contents: write | ||
name: Test | ||
timeout-minutes: 5 | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [20] | ||
pnpm-version: [8] | ||
steps: | ||
# FIXME : | ||
# - Use a mongodb service for tests instead of mongo-memory-server | ||
# - Or fix the mongo-memory-server issue with https://github.com/nodkz/mongodb-memory-server/discussions/566#discussioncomment-1554416 | ||
# - name: Check out code | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# fetch-depth: 2 | ||
# - uses: pnpm/action-setup@v2.0.1 | ||
# with: | ||
# version: ${{ matrix.pnpm-version }} | ||
# - name: Setup Node.js environment | ||
# uses: actions/setup-node@v2 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
# cache: pnpm | ||
# - name: Install dependencies | ||
# run: pnpm install | ||
# - name: Install Playwright | ||
# run: pnpm exec playwright-core install | ||
# - name: Test | ||
# run: pnpm test:ci | ||
# Coverage measurement is not working properly with e2e tests | ||
# - name: Code Coverage Report | ||
# uses: irongut/CodeCoverageSummary@v1.3.0 | ||
# with: | ||
# filename: coverage/cobertura-coverage.xml | ||
# badge: true | ||
# fail_below_min: false | ||
# format: markdown | ||
# hide_branch_rate: false | ||
# hide_complexity: false | ||
# indicators: true | ||
# output: both | ||
# thresholds: 80 90 | ||
# - name: Add Coverage PR Comment | ||
# uses: marocchino/sticky-pull-request-comment@v2 | ||
# if: github.event_name == 'pull_request' | ||
# with: | ||
# recreate: true | ||
# path: code-coverage-results.md |