💚 Fix test coverage actions workflow

This commit is contained in:
Manuel 2023-09-03 14:14:07 +02:00
parent a50e87a602
commit 8d3829807a

View File

@ -35,6 +35,8 @@ jobs:
uses: actions/setup-node@v3 uses: actions/setup-node@v3
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get yarn cache directory path - name: Get yarn cache directory path
id: yarn-cache-dir-path id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
@ -47,13 +49,13 @@ jobs:
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
- run: yarn install --immutable - run: yarn install --immutable
- run: yarn test:cov - run: yarn test:cov
- run: curl https://deepsource.io/cli | sh - name: Add git safe.directory for container
- name: Report test-coverage to DeepSource
run: | run: |
# Install the CLI mkdir -p /home/runner/work/_temp/_github_home
curl https://deepsource.io/cli | sh printf "[safe]\ndirectory = /github/workspace" > /home/runner/work/_temp/_github_home/.gitconfig
- name: Report test-coverage to DeepSource
# Send the report to DeepSource uses: deepsourcelabs/test-coverage-action@master
./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./coverage/lcov.info with:
env: key: javascript
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} coverage-file: ./coverage/lcov.info
dsn: ${{ secrets.DEEPSOURCE_DSN }}