Skip to content

Capsolver

Capsolver #12

name: On PR to Main
on:
pull_request:
branches: [main]
jobs:
pr_pipeline:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch Code
run: git fetch origin main
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install Dependencies
run: npm install && npm ci
- name: Test with Coverage (Nx Affected)
run: 'rm -rf coverage && npx nx affected -t test --skip-nx-cache --coverage --coverageReporters=json,json-summary'
- name: Archive сode сoverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: ./coverage/**/coverage-summary.json
if-no-files-found: error
- name: Code сoverage
uses: dkhunt27/nx-code-coverage@v1
with:
github-token: ${{ secrets.AUTH_TOKEN }}
no-coverage-ran: false
coverage-folder: ./coverage
gist-token: ${{ secrets.GIST_SECRET }}
gist-id: d34d7d9392f4f0e6aa927cb035b86d34
color: green
named-logo: jest