diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b4840e9..51fb952d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,27 +1,48 @@ name: Test -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: jobs: test: - runs-on: macos-latest - + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + env: + DISPLAY: :0 steps: - - uses: FedericoCarboni/setup-ffmpeg@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - if: runner.os == 'macOS' + run: brew install ffmpeg + - if: runner.os == 'Linux' + run: | + sudo apt-get update && sudo apt-get install -y \ + build-essential \ + ffmpeg \ + libcairo2-dev \ + libgif-dev \ + libglew-dev \ + libglu1-mesa-dev \ + libjpeg-dev \ + libpango1.0-dev \ + librsvg2-dev \ + libxi-dev \ + pkg-config + - if: runner.os == 'Linux' + run: sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 & + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 16 - cache: 'yarn' - - - run: yarn install --frozen-lockfile + node-version: 22 + cache: "yarn" + cache-dependency-path: ./package.json + - run: yarn install - run: npm run lint - run: npm run test - - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: video path: editly-out.mp4 diff --git a/examples/customCanvas.js b/examples/customCanvas.js index 2df986fc..0fd4c165 100644 --- a/examples/customCanvas.js +++ b/examples/customCanvas.js @@ -1,4 +1,4 @@ -import editly from '..'; +import editly from '../index.js'; async function func({ canvas }) { async function onRender(progress) { diff --git a/examples/customFabric.js b/examples/customFabric.js index 6e092a3c..cf4c223c 100644 --- a/examples/customFabric.js +++ b/examples/customFabric.js @@ -1,4 +1,4 @@ -import editly from '..'; +import editly from '../index.js'; /* eslint-disable spaced-comment,no-param-reassign */ diff --git a/examples/fabricImagePostProcessing.js b/examples/fabricImagePostProcessing.js index f770f61c..ac061ad8 100644 --- a/examples/fabricImagePostProcessing.js +++ b/examples/fabricImagePostProcessing.js @@ -1,4 +1,4 @@ -import editly from '..'; +import editly from '../index.js'; // See https://github.com/mifi/editly/pull/222 diff --git a/examples/renderSingleFrame.js b/examples/renderSingleFrame.js index 3d4402d7..d396538d 100644 --- a/examples/renderSingleFrame.js +++ b/examples/renderSingleFrame.js @@ -2,7 +2,7 @@ import { parse } from 'json5'; import fsExtra from 'fs-extra'; // eslint-disable-next-line import/named -import { renderSingleFrame } from '..'; +import { renderSingleFrame } from '../index.js'; (async () => { await renderSingleFrame({