Tests #644
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: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| schedule: | |
| # 00:00 on Saturdays | |
| - cron: '0 0 * * SAT' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [18.x] | |
| include: | |
| - node-version: 20.x | |
| - node-version: lts/* | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: '2' | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Test on Node ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install | |
| - run: npx prettier --check . | |
| working-directory: ./ | |
| - run: yarn run build | |
| - run: yarn run lint | |
| - run: yarn run test | |
| - run: npx testpack-cli --keep=@types/*,ts-jest,typescript jest.config.js tsconfig.test.json src/e2e.spec.ts | |
| working-directory: ./packages/regex-to-strings | |
| - name: Upload test coverage report to Codecov | |
| uses: codecov/codecov-action@v5.5.1 | |
| with: | |
| fail_ci_if_error: true | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Setup Snyk | |
| uses: snyk/actions/setup@master | |
| id: snyk | |
| with: | |
| snyk-version: latest | |
| - name: Snyk version | |
| run: echo "${{ steps.snyk.outputs.version }}" | |
| - name: Run Snyk to check for vulnerabilities | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| uses: snyk/actions/node@master | |
| env: | |
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |