Skip to content

feat(gameObject): add angular velocity and acceleration #55

feat(gameObject): add angular velocity and acceleration

feat(gameObject): add angular velocity and acceleration #55

Workflow file for this run

name: Tests
on:
# Allow triggering the workflow manually from UI
workflow_dispatch:
pull_request:
# Allow a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
# Detect file changes to conditionally run permutation tests
change-detection:
name: Detect Changes
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
gameObject: ${{ steps.filter.outputs.gameObject }}
sprite: ${{ steps.filter.outputs.sprite }}
text: ${{ steps.filter.outputs.text }}
tileEngine: ${{ steps.filter.outputs.tileEngine }}
updatable: ${{ steps.filter.outputs.updatable }}
vector: ${{ steps.filter.outputs.vector }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
gameObject:
- 'src/gameObject.js'
sprite:
- 'src/sprite.js'
text:
- 'src/text.js'
tileEngine:
- 'src/tileEngine.js'
updatable:
- 'src/updatable.js'
vector:
- 'src/vector.js'
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: npm ci
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run unit tests
run: npm run test
typescript-test:
name: Typescript Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: npm ci
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run typescript tests
run: |
npm run build
npm run test:ts
permutation-gameObject-test:
name: "Permutation Tests: GameObject"
needs: change-detection
if: needs.change-detection.outputs.gameObject == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: npm ci
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run permutation:gameObject tests
run: |
npm run build
npm run test:permutations gameObject
permutation-sprite-test:
name: "Permutation Tests: Sprite"
needs: change-detection
if: needs.change-detection.outputs.sprite == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: npm ci
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run permutation:sprite tests
run: |
npm run build
npm run test:permutations sprite
permutation-text-test:
name: "Permutation Tests: Text"
needs: change-detection
if: needs.change-detection.outputs.text == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: npm ci
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run permutation:text tests
run: |
npm run build
npm run test:permutations text
permutation-tileEngine-test:
name: "Permutation Tests: TileEngine"
needs: change-detection
if: needs.change-detection.outputs.tileEngine == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: npm ci
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run permutation:tileEngine tests
run: |
npm run build
npm run test:permutations tileEngine
permutation-updatable-test:
name: "Permutation Tests: Updatable"
needs: change-detection
if: needs.change-detection.outputs.updatable == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: npm ci
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run permutation:updatable tests
run: |
npm run build
npm run test:permutations updatable
permutation-vector-test:
name: "Permutation Tests: Vector"
needs: change-detection
if: needs.change-detection.outputs.vector == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-${{ hashFiles('./package-lock.json') }}
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: npm ci
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Run permutation:vector tests
run: |
npm run build
npm run test:permutations vector