Daily Tests #96
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
| # ======================================================================= | |
| # Daily Tests Workflow | |
| # ======================================================================= | |
| # | |
| # This workflow runs unit tests for the console-table-printer and simple-wcswidth | |
| # packages on multiple Node.js versions (18.x, 20.x, 22.x, 24.x). | |
| # | |
| # It performs: | |
| # - JavaScript unit tests | |
| # - TypeScript import and type tests | |
| # - Tests run on all supported Node.js versions | |
| # | |
| # The workflow runs: | |
| # - Daily at 00:00 UTC | |
| # - On push to main branch | |
| # - Manually via workflow_dispatch | |
| # | |
| # ======================================================================= | |
| name: Daily Tests | |
| on: | |
| schedule: | |
| # Run once a day at midnight UTC | |
| - cron: '0 0 * * *' | |
| # Also run on push to main branch | |
| push: | |
| branches: [ main ] | |
| # Allow manual triggering | |
| workflow_dispatch: | |
| jobs: | |
| daily-tests: | |
| name: Daily Tests (Node ${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x, 24.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Run JavaScript and TypeScript tests | |
| run: yarn test |