chore: Format code #3993
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: ci | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - next | |
| paths-ignore: | |
| - "**.md" | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.head.label || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run build | |
| - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 | |
| with: | |
| name: build | |
| path: | | |
| packages/*/dist/** | |
| packages/framework/*.d.ts | |
| if-no-files-found: error | |
| test: | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-latest, windows-latest, macos-latest] | |
| name: test-bun (${{ matrix.platform }}) | |
| runs-on: ${{ matrix.platform }} | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 | |
| with: | |
| name: build | |
| path: packages | |
| - uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run test --coverage-reporter=lcov --coverage-reporter=text | |
| - name: Report coverage | |
| if: ${{ matrix.platform == 'ubuntu-latest' && github.repository_owner == 'maxmilton' }} | |
| uses: qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899 # v2 | |
| with: | |
| token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| files: coverage/lcov.info | |
| test-node: | |
| needs: build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [12, 14, 16, 18, 20, 22, 24] | |
| platform: [ubuntu-latest, windows-latest, macos-latest] | |
| exclude: | |
| # no prebuilt node <=14 for darwin arm64 (macos-latest; macos-14) | |
| - node-version: 12 | |
| platform: macos-latest | |
| - node-version: 14 | |
| platform: macos-latest | |
| include: | |
| - node-version: 12 | |
| platform: macos-13 | |
| - node-version: 14 | |
| platform: macos-13 | |
| name: test-node (v${{ matrix.node-version }} ${{ matrix.platform }}) | |
| runs-on: ${{ matrix.platform }} | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 | |
| with: | |
| name: build | |
| path: packages | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: npm run test:node | |
| if: ${{ matrix.node-version < 24 || matrix.platform != 'ubuntu-latest' }} | |
| - run: npm run test:node:c8 | |
| if: ${{ matrix.node-version == 24 && matrix.platform == 'ubuntu-latest' }} | |
| - name: Report coverage | |
| if: ${{ matrix.platform == 'ubuntu-latest' && github.repository_owner == 'maxmilton' }} | |
| uses: qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899 # v2 | |
| with: | |
| token: ${{ secrets.QLTY_COVERAGE_TOKEN }} | |
| files: coverage/lcov.info | |
| lint: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 | |
| with: | |
| name: build | |
| path: packages | |
| - uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2 | |
| with: | |
| bun-version: latest | |
| - run: bun install --frozen-lockfile | |
| - run: bun run lint |