chore(): update prettier (#10863) #66
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: '🧪' | |
| on: | |
| push: | |
| branches: [master] | |
| paths-ignore: [CHANGELOG.md] | |
| pull_request: | |
| branches: [master] | |
| paths-ignore: [CHANGELOG.md] | |
| permissions: | |
| actions: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| prime-build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - name: Install dependencies | |
| uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 24.x | |
| install-system-deps: false | |
| - name: Build fabric.js | |
| uses: ./.github/actions/build-fabric-cached | |
| vitest-coverage: | |
| name: Vitest tests Node 24 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 24.x | |
| install-system-deps: false | |
| - name: Run Vitest unit test | |
| run: npm run test:vitest:coverage | |
| - name: Upload test coverage | |
| uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
| with: | |
| name: coverage-vitest | |
| path: ./.nyc_output/*.json | |
| include-hidden-files: true | |
| vitest-browser: | |
| name: Vitest tests ${{matrix.browser}} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| browser: [chromium, firefox] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 24.x | |
| install-system-deps: false | |
| - name: Install Playwright Browsers ${{matrix.browser}} | |
| run: npx playwright install --with-deps ${{matrix.browser}} | |
| - name: Run Vitest unit test | |
| run: xvfb-run npm run test:vitest:${{matrix.browser}} | |
| env: | |
| LIBGL_ALWAYS_SOFTWARE: true | |
| vitest-node-20: | |
| name: Vitest tests node 20 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 20.x | |
| install-system-deps: false | |
| - name: Run Vitest unit test | |
| run: npm run test:vitest | |
| vitest-node-22: | |
| name: Vitest tests node 22 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 22.x | |
| install-system-deps: false | |
| - name: Run Vitest unit test | |
| run: npm run test:vitest | |
| e2e: | |
| needs: [prime-build] | |
| name: Playwright tests | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 24.x | |
| - name: Build fabric.js | |
| uses: ./.github/actions/build-fabric-cached | |
| # Playwright suggests against caching the browser install | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run Playwright tests | |
| run: xvfb-run npm run test:e2e | |
| - name: Upload Test Output | |
| uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
| if: failure() | |
| with: | |
| name: e2e-report | |
| path: ./e2e/test-report/ | |
| include-hidden-files: true | |
| - name: Upload Test Coverage | |
| uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
| with: | |
| name: coverage-e2e | |
| path: ./e2e/test-results/**/coverage.json | |
| include-hidden-files: true | |
| - name: Create prnumber artifact | |
| run: echo "${{ github.event.pull_request.number }}" >> ./prnumber.txt | |
| - name: Upload Pr Number | |
| uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | |
| with: | |
| name: prnumber | |
| path: ./prnumber.txt |