Skip to content

fix(Fabtictext) Svg export for text on a path #6527

fix(Fabtictext) Svg export for text on a path

fix(Fabtictext) Svg export for text on a path #6527

Workflow file for this run

name: '🧪'
on:
push:
branches: [master]
paths-ignore: [CHANGELOG.md]
pull_request:
branches: [master]
paths-ignore: [CHANGELOG.md]
jobs:
prime-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
uses: ./.github/actions/cached-install
with:
node-version: 20.x
install-system-deps: false
- name: Build fabric.js
uses: ./.github/actions/build-fabric-cached
node-coverage:
needs: [prime-build]
runs-on: ubuntu-latest
name: Node 20.x ${{ matrix.suite }} tests
strategy:
fail-fast: false
matrix:
# For more information see:
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# supported Node.js release schedule: https://nodejs.org/en/about/releases/
suite: [unit, visual]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
with:
node-version: 20.x
install-system-deps: false
- name: Build fabric.js
uses: ./.github/actions/build-fabric-cached
- name: Run ${{ matrix.suite }} tests with coverage
if: matrix.suite == 'unit'
run: npm run test:coverage && sleep 5
- name: Run ${{ matrix.suite }} tests with coverage
if: matrix.suite == 'visual'
run: npm run test:visual:coverage
- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.suite }}
path: .nyc_output/*.json
browser:
needs: [prime-build]
name: ${{ matrix.target }} ${{ matrix.suite }} tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
target: [chrome, firefox]
suite: [unit, visual]
fail-fast: false
steps:
- name: Unit tests on browser ${{ matrix.target }}
uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
with:
node-version: ${{ matrix.node-version }}
- name: Build fabric.js
uses: ./.github/actions/build-fabric-cached
- name: Run ${{ matrix.target }} ${{ matrix.suite }} headless test
run: xvfb-run npm run test -- -c ${{ matrix.target }} -s ${{ matrix.suite }}
node:
needs: [prime-build]
runs-on: ubuntu-latest
name: Node ${{ matrix.node-version }} ${{ matrix.suite }} tests
strategy:
fail-fast: false
matrix:
# For more information see:
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# supported Node.js release schedule: https://nodejs.org/en/about/releases/
node-version: ['18.x']
suite: [unit, visual]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
with:
node-version: ${{ matrix.node-version }}
install-system-deps: 'false'
- name: Build fabric.js
uses: ./.github/actions/build-fabric-cached
- name: Run ${{ matrix.suite }} tests
run: npm run test -- -c node -s ${{ matrix.suite }}
jest:
name: Jest tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
with:
node-version: 20.x
install-system-deps: false
- name: Run Jest unit test
run: npm run test:jest:coverage
- name: Upload test coverage
uses: actions/upload-artifact@v4
with:
name: coverage-jest
path: .nyc_output/*.json
e2e:
needs: [prime-build]
name: Playwright tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
with:
node-version: 20.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@v4
if: failure()
with:
name: e2e-report
path: ./e2e/test-report/
- name: Upload Test Coverage
uses: actions/upload-artifact@v4
with:
name: coverage-e2e
path: ./e2e/test-results/**/coverage.json
coverage:
needs: [node-coverage, e2e]
name: Coverage reporting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/cached-install
with:
node-version: 20.x
install-system-deps: false
- uses: actions/download-artifact@v4
with:
name: coverage-unit
path: .nyc_output
- uses: actions/download-artifact@v4
with:
name: coverage-visual
path: .nyc_output
- uses: actions/download-artifact@v4
with:
name: coverage-e2e
path: .nyc_output
- uses: actions/download-artifact@v4
with:
name: coverage-jest
path: .nyc_output
- run: ls -l .nyc_output
- run: npm run coverage:report
- uses: romeovs/lcov-reporter-action@v0.4.0
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true