Skip to content

chore: update js-yaml transitive dependency #376

chore: update js-yaml transitive dependency

chore: update js-yaml transitive dependency #376

Workflow file for this run

name: Unit Tests
on:
workflow_call:
push:
branches: [main]
pull_request:
types:
- opened # PR was open
- synchronize # PR was updated
- reopened # PR was closed and is now open again
- ready_for_review # PR was converted from draft to open
- converted_to_draft # PR was converted from open to draft
concurrency:
group: unit-tests_${{ github.workflow }}_${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
unit_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
- name: Setup node
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Run Unit Tests
run: |
pnpm coverage --collectCoverageFrom="packages/gerador-validador-cpf/**/*.{tsx,ts,js,jsx}" --coverageDirectory=packages/gerador-validador-cpf/coverage &&
pnpm coverage --collectCoverageFrom="packages/gerador-validador-cnpj/**/*.{tsx,ts,js,jsx}" --coverageDirectory=packages/gerador-validador-cnpj/coverage
- name: Upload CPF coverage reports to Codecov
if: github.event_name != 'workflow_call'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/gerador-validador-cpf/coverage/lcov.info
flags: cpf
- name: Upload CNPJ coverage reports to Codecov
if: github.event_name != 'workflow_call'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/gerador-validador-cnpj/coverage/lcov.info
flags: cnpj
- name: Run Mutation Tests and Publish to Dashboard
if: github.event_name != 'workflow_call' && github.event_name != 'pull_request'
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
run: pnpm test:mutation
- name: Run Unit Test Against Package
# pnpm has a bug with pack script https://github.com/pnpm/pnpm/issues/4351
run: |
pnpm pack-extract
pnpm test:package