Repository navigation
feat(get-cnpj-info): add getCnpjInfo to read the root, branch and check digits of a CNPJ #731
This file contains hidden or 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: Tests | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| # A newer push to a pull request supersedes its run; a push to main always finishes, so the | |
| # badges never show a cancelled run as failing. | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-node: | |
| name: Test on Node.js (${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| matrix: | |
| node-version: [20, 22, 24, 26] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Print the Node.js version in use | |
| run: node --version | |
| - name: Run tests | |
| if: matrix.node-version != 24 | |
| run: vp test | |
| - name: Run tests with coverage | |
| if: matrix.node-version == 24 | |
| run: vp test run --coverage | |
| - name: Upload coverage to Codecov | |
| if: matrix.node-version == 24 | |
| uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/lcov.info | |
| fail_ci_if_error: true | |
| flags: node | |
| test-bun: | |
| name: Test on Bun | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| - name: Run tests | |
| run: bun test src | |
| test-deno: | |
| name: Test on Deno | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5 | |
| with: | |
| deno-version: v2.x | |
| - name: Run tests | |
| run: deno test --unstable-sloppy-imports --allow-net --allow-env src | |
| # What JSR would reject at release time fails here instead: slow types in the public API, | |
| # an export of jsr.json that does not resolve, a file outside the publish list. | |
| - name: Dry-run the JSR publication | |
| run: deno publish --dry-run | |
| test-browsers: | |
| name: Test on Browsers (${{ matrix.browser }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| matrix: | |
| browser: [edge, chrome, firefox] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Run tests in ${{ matrix.browser }} | |
| run: vp test --browser.enabled --browser.name=${{ matrix.browser }} | |
| test-safari: | |
| name: Test on Browsers (safari) | |
| runs-on: macos-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Run tests in Safari | |
| run: vp test --browser.enabled --browser.name=safari --browser.headless=false |