diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08699be..34d07a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,12 +9,11 @@ concurrency: cancel-in-progress: true jobs: - default: + ci: name: Lint and Test with Node.js ${{ matrix.node }} on ${{ matrix.os }} strategy: matrix: node: - - 16 - 18 - 20 - 22 @@ -24,8 +23,6 @@ jobs: - macos-latest fail-fast: false runs-on: ${{ matrix.os }} - env: - YARN_IGNORE_NODE: 1 steps: - uses: actions/checkout@v4 @@ -38,12 +35,14 @@ jobs: - name: Install Dependencies run: yarn --immutable - - name: Build and Typecov - run: yarn run-s build typecov + - name: Build, Lint and Test + run: | + yarn build + yarn run-p lint test typecov env: - EFF_NO_LINK_RULES: true PARSER_NO_WATCH: true - - name: Lint and Test - if: ${{ matrix.node != 16}} - run: yarn run-s lint test + - name: Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/tests/e2e/e2e.spec.ts b/tests/e2e/e2e.spec.ts index 680a693..4fc19e5 100644 --- a/tests/e2e/e2e.spec.ts +++ b/tests/e2e/e2e.spec.ts @@ -4,6 +4,8 @@ import path from 'node:path' import { tryFile } from '@pkgr/core' import { exec } from 'tinyexec' +const TIMEOUT = 30_000 + describe('e2e cases', async () => { const { dirname } = import.meta @@ -26,31 +28,35 @@ describe('e2e cases', async () => { }) } - it('should exec eslint successfully', async () => { - const eslintConfig = tryFile('eslint.config.js', false, absoluteDir) - expect( - await exec( - 'yarn', - [ - 'eslint', - ...(eslintConfig - ? ['-c', eslintConfig] - : ['--ignore-pattern', '!.dot']), - '--ext', - 'cjs,cts,js,jsx,mjs,mts,ts,tsx', - '--report-unused-disable-directives', - absoluteDir, - ], - { - nodeOptions: { - env: { - ESLINT_USE_FLAT_CONFIG: eslintConfig ? undefined : 'false', - NODE_OPTIONS: '--no-warnings=ESLintRCWarning', + it( + `should exec eslint successfully > ${dirName}`, + async () => { + const eslintConfig = tryFile('eslint.config.js', false, absoluteDir) + expect( + await exec( + 'yarn', + [ + 'eslint', + ...(eslintConfig + ? ['-c', eslintConfig] + : ['--ignore-pattern', '!.dot']), + '--ext', + 'cjs,cts,js,jsx,mjs,mts,ts,tsx', + '--report-unused-disable-directives', + absoluteDir, + ], + { + nodeOptions: { + env: { + ESLINT_USE_FLAT_CONFIG: eslintConfig ? undefined : 'false', + NODE_OPTIONS: '--no-warnings=ESLintRCWarning', + }, }, }, - }, - ), - ).toMatchSnapshot(dirName) - }) + ), + ).toMatchSnapshot() + }, + TIMEOUT, + ) } })