name: Test and coverage
on:
  pull_request:
    branches:
      - '*'
jobs:
  coverage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: ArtiomTr/jest-coverage-report-action@v2
        with:
          working-directory: Express/barAndCafe
          test-script: npm run test
          output: comment, report-markdown
          prnumber: ${{ steps.findPr.outputs.number }}
          custom-title: Coverage report for backend
          github-token: ${{ secrets.PR_TOCKEN}}
          annotations: none #disable annotation
        env:
          OPEN_TRIP_MAPS_KEY: ${{ secrets.OPEN_TRIP_MAPS_KEY}}