remove PrivacyPolicyButton component #1813
Workflow file for this run
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: Run CI checks | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
changes: | |
runs-on: ubuntu-latest | |
# Required permissions | |
permissions: | |
pull-requests: read | |
# Set job outputs to values from filter step | |
outputs: | |
backend: ${{ steps.filter.outputs.backend }} | |
frontend: ${{ steps.filter.outputs.frontend }} | |
steps: | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
backend: | |
- 'backend/**' | |
frontend: | |
- 'frontend/**' | |
backend: | |
needs: changes | |
if: ${{ needs.changes.outputs.backend == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies | |
run: cd backend && npm ci | |
- name: Run unit tests and generate coverage report | |
run: cd backend && npm run test-ci:unit | |
- name: Debug | |
run: cd backend && cat coverage/lcov.info | |
- name: Display code coverage within Pull request | |
uses: jgillick/test-coverage-reporter@main | |
with: | |
coverage-file: backend/coverage/coverage-summary.json | |
access-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Report code coverage to Deepsource | |
run: | | |
curl https://deepsource.io/cli | sh | |
./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./backend/coverage/lcov.info | |
env: | |
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} | |
- name: Check linting | |
run: cd backend && npm run lint | |
- name: Check formatting | |
run: cd backend && npm run prettier | |
frontend: | |
needs: changes | |
if: ${{ needs.changes.outputs.frontend == 'true' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
- name: Install dependencies | |
run: cd frontend && npm ci | |
- name: Check linting | |
run: cd frontend && npm run lint | |
- name: Check formatting | |
run: cd frontend && npm run prettier | |
- name: Create minimalistic coverage report | |
run: | | |
cd frontend | |
echo "TN:" > lcov.info | |
echo "SF:/src/file.js" >> lcov.info | |
echo "FN:1,(anonymous)" >> lcov.info | |
echo "FNF:1" >> lcov.info | |
echo "FNH:0" >> lcov.info | |
echo "FNDA:0,(anonymous)" >> lcov.info | |
echo "DA:1,0" >> lcov.info | |
echo "LF:1" >> lcov.info | |
echo "LH:0" >> lcov.info | |
echo "BRF:0" >> lcov.info | |
echo "BRH:0" >> lcov.info | |
echo "end_of_record" >> lcov.info | |
- name: Report code coverage to Deepsource | |
run: | | |
curl https://deepsource.io/cli | sh | |
./bin/deepsource report --analyzer test-coverage --key javascript --value-file ./frontend/lcov.info | |
env: | |
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} | |
# - name: Run unit tests (One day) | |
# run: cd frontend && npm run test:unit |