diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..dc9e4ec --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: Node.js CI +on: + push: + branches: [ '**' ] + tags: [ '**' ] + pull_request: + branches: [ '**' ] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js 16.x + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + - name: Install npm + run: npm install -g npm@8 + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build + - name: Run Unit Tests + uses: GabrielBB/xvfb-action@v1 + with: + run: npm test + diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index dc9e4ec..157c1b8 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -9,20 +9,18 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Use Node.js 16.x - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - name: Use Node.js 18.x + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 cache: 'npm' - - name: Install npm - run: npm install -g npm@8 - name: Install dependencies run: npm ci - name: Build run: npm run build - name: Run Unit Tests - uses: GabrielBB/xvfb-action@v1 + uses: coactions/setup-xvfb@v1 with: run: npm test diff --git a/test/AnimatedGIFAsset.test.ts b/test/AnimatedGIFAsset.test.ts index dc2f01c..45650b9 100644 --- a/test/AnimatedGIFAsset.test.ts +++ b/test/AnimatedGIFAsset.test.ts @@ -1,4 +1,4 @@ -import { Assets } from '@pixi/assets'; +import { Assets } from 'pixi.js'; import { AnimatedGIF, AnimatedGIFAsset } from '../src'; import { createServer } from './resources'; @@ -33,7 +33,7 @@ describe('AnimatedGIFLoader', () => { const url = `${baseUrl}/example.gif`; - Assets.add('test', url); + Assets.add({ alias: 'test', src: url }); const test = await Assets.load('test'); expect(test); @@ -60,7 +60,7 @@ describe('AnimatedGIFLoader', () => const data = { loop: false, autoUpdate: false, animationSpeed: 2 }; - Assets.add('test1', url, data); + Assets.add({ alias: 'test1', src: url, data }); const test = await Assets.load('test1'); expect(test);