never undefined #55
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
| # This workflow will do a clean installation of node dependencies, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Node.js CI | |
| on: | |
| push: | |
| paths: | |
| - benchmark.js | |
| - package.json | |
| - package-lock.json | |
| - .github/workflows/*.yml | |
| - .c8rc.coveralls.json | |
| - test/test.js | |
| - test/index.html | |
| - playwright.js | |
| - rolldown.config.js | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - benchmark.js | |
| - package.json | |
| - package-lock.json | |
| - test/test.js | |
| - test/index.html | |
| jobs: | |
| fail-early: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node_version: | |
| - 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node_version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node_version }} | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: node ./dump-version.js | |
| - run: ./node_modules/.bin/rolldown -c ./rolldown.config.js | |
| - run: node ./test/test.js | |
| basic-checks: | |
| runs-on: ubuntu-latest | |
| needs: fail-early | |
| strategy: | |
| matrix: | |
| node_version: | |
| - 22 | |
| - 23 | |
| - 24 | |
| - 25 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node_version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node_version }} | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: node ./dump-version.js | |
| - run: ./node_modules/.bin/rolldown -c ./rolldown.config.js | |
| - run: node ./test/test.js | |
| playwright: | |
| name: Playwright | |
| runs-on: ubuntu-latest | |
| needs: fail-early | |
| strategy: | |
| matrix: | |
| browser: | |
| - firefox | |
| - webkit | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 20 (${{ matrix.browser }}) | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: node ./dump-version.js | |
| - run: ./node_modules/.bin/rolldown -c ./rolldown.config.js | |
| - uses: hoverkraft-tech/compose-action@05da55b2bb8a5a759d1c4732095044bd9018c050 | |
| with: | |
| services: tests | |
| cwd: ./.devcontainer/ | |
| compose-file: ./docker-compose.yml | |
| - name: http check | |
| id: http-check | |
| uses: fjogeleit/http-request-action@v1 | |
| with: | |
| url: "http://localhost:8003" | |
| method: GET | |
| - run: ./node_modules/.bin/playwright install --with-deps --only-shell ${{ matrix.browser }} | |
| - run: node ./playwright.js http://localhost:8003 --browser=${{ matrix.browser }} | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| needs: fail-early | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 20 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: node ./dump-version.js | |
| - run: ./node_modules/.bin/rolldown -c ./rolldown.config.js | |
| - name: Node Coverage (with microtime) | |
| run: ./node_modules/.bin/c8 -c ./.c8rc.node.json node ./test/test.js | |
| - run: npm ci --omit=optional | |
| - name: Node Coverage (without microtime) | |
| run: ./node_modules/.bin/c8 -c ./.c8rc.node.json node ./test/test.js | |
| - uses: hoverkraft-tech/compose-action@05da55b2bb8a5a759d1c4732095044bd9018c050 | |
| with: | |
| services: tests | |
| cwd: ./.devcontainer/ | |
| compose-file: ./docker-compose.yml | |
| - name: http check | |
| id: http-check | |
| uses: fjogeleit/http-request-action@v1 | |
| with: | |
| url: "http://localhost:8003" | |
| method: GET | |
| - run: ./node_modules/.bin/playwright install --with-deps --only-shell chromium | |
| - name: Browser Coverage | |
| run: node ./playwright.js http://localhost:8003 --browser=chromium | |
| - run: cp -r ./coverage/*/tmp/*.json ./coverage/tmp | |
| - run: ls -R ./coverage/tmp/ | |
| - name: Merge Coverage | |
| run: ./node_modules/.bin/c8 -c ./.c8rc.coveralls.json report | |
| - name: Coveralls GitHub Action | |
| uses: coverallsapp/github-action@v2.2.3 | |
| with: | |
| file: './coverage/lcov.info' |