name: Run tests on: pull_request: jobs: unit_test: name: Unit tests runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2.2.4 with: run_install: false - name: Get pnpm store directory id: pnpm-cache shell: bash run: | echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - uses: actions/cache@v3 name: Setup pnpm cache with: path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - uses: actions/setup-node@v3 with: node-version: 18 # cache: "pnpm" - name: Install dependencies run: pnpm install - name: Generate schema run: pnpm generate - name: Test run: pnpm test:ci # TODO: Add coverage - crawl through every package # - name: Generate coverage report # uses: irongut/CodeCoverageSummary@v1.3.0 # with: # filename: coverage/cobertura-coverage.xml # format: markdown # output: file # # - 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