Skip to content

Commit

Permalink
Fix tests, update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtimebuddy committed Feb 16, 2024
1 parent 15f43f5 commit a936e7a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 10 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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

12 changes: 5 additions & 7 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

6 changes: 3 additions & 3 deletions test/AnimatedGIFAsset.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Assets } from '@pixi/assets';
import { Assets } from 'pixi.js';
import { AnimatedGIF, AnimatedGIFAsset } from '../src';
import { createServer } from './resources';

Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit a936e7a

Please sign in to comment.