Skip to content

Commit

Permalink
chore: make pipeline fast again (#296)
Browse files Browse the repository at this point in the history
* chore: update

* feat: new docs

* chore: update package-lock.json

* chore: get rid of internal package

* chore: recreate package-lock.json (again)

* chore: clean cache

* chore: more testing

* chore: getting closer maybe

* chore: syntax error

* chore: delete all other jobs

* chore: try something else

* chore: new attempt

* chore: upgrade learna

* chore: update more dependencies

* chore: update puppetteer

* chore: ignore docs

* chore: include all jobs

* chore: prettier

* chore: delete docs job

* chore: remove changelogs

* chore: upgrade vite, still not happy tho

* Revert "chore: upgrade vite, still not happy tho"

This reverts commit ddbab88.

* chore: commonjs

* chore: skip lib check

* chore: more skiplibcheck

* chore: add some debugging steps

* chore: dependency

* chore: get npm and node version

* chore: try this

* chore: git list

* chore: try this maybe

* chore: more precise file path

* chore: update command

* chore: leading slash

* chore: add some more logging

* chore: try this

* chore: i think i got it

* chore: is it fixed??

* chore: add puppeteer

* chore: try this

* chore: test
  • Loading branch information
hkonsti authored Sep 24, 2024
1 parent 2c5cd7b commit 90af848
Show file tree
Hide file tree
Showing 310 changed files with 15,273 additions and 88,071 deletions.
216 changes: 39 additions & 177 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,227 +8,89 @@ env:
HUSKY: 0

jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: PUPPETEER_PRODUCT=chrome npm ci
- uses: actions/cache/save@v3
with:
key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
commit:
name: Commit name
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
- run: npm ci
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --verbose
lint:
name: Lint
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
- run: npm run eslint
- run: npm ci
- run: npx eslint "**/*.ts?(x)"
prettier:
name: Code style
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
- run: npm ci
- run: npm run prettier
build:
name: Build
needs: prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
- run: node --version
- run: npm --version
- run: npm ci
# TODO: FFmpeg and ffprobe installer don't automatically install the binaries
- run: npm install @ffmpeg-installer/ffmpeg
- run: npm install @ffprobe-installer/ffprobe
- run: npm list
- run: npx lerna run build
- uses: actions/cache/save@v3
with:
key: ${{ github.run_id }}-build
path: |
packages/2d/lib
packages/2d/editor
packages/core/lib
packages/ui/dist
packages/player/dist
packages/vite-plugin/lib
packages/telemetry/dist
packages/ffmpeg/dist
- run: npm run examples:build
tests:
name: Unit tests
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-build
path: |
packages/2d/lib
packages/2d/editor
packages/core/lib
packages/ui/dist
packages/player/dist
packages/vite-plugin/lib
packages/telemetry/dist
packages/ffmpeg/dist
- run: npm ci
- run: npx lerna run build
- run: npx lerna run test
examples:
name: Examples
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-build
path: |
packages/2d/lib
packages/2d/editor
packages/core/lib
packages/ui/dist
packages/player/dist
packages/vite-plugin/lib
packages/telemetry/dist
packages/ffmpeg/dist
- run: npm run examples:build
e2e:
name: E2E
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-build
path: |
packages/2d/lib
packages/2d/editor
packages/core/lib
packages/ui/dist
packages/player/dist
packages/vite-plugin/lib
packages/telemetry/dist
packages/ffmpeg/dist
- run: npm ci
- run: npx puppeteer browsers install chrome
# TODO: FFmpeg and ffprobe installer don't automatically install the binaries
- run: npm install @ffmpeg-installer/ffmpeg
- run: npm install @ffprobe-installer/ffprobe
- run: npx lerna run build
- run: npm run e2e:test
- uses: actions/upload-artifact@v3
if: failure()
with:
name: image-diffs
path: packages/e2e/src/__image_snapshots__/__diff_output__
docs:
name: Documentation
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-node-modules
path: |
**/node_modules
~/.cache/puppeteer
- uses: actions/cache/restore@v3
with:
key: ${{ github.run_id }}-build
path: |
packages/2d/lib
packages/2d/editor
packages/core/lib
packages/ui/dist
packages/player/dist
packages/vite-plugin/lib
packages/telemetry/dist
packages/ffmpeg/dist
- run: npx lerna run bundle
- run: npm run docs:build
env:
NODE_OPTIONS: "--max-old-space-size=8192"
path: packages/e2e/src/__image_snapshots__/__diff_output__
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ tsconfig.tsbuildinfo

.idea
id.txt

.nx
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
Loading

0 comments on commit 90af848

Please sign in to comment.