Skip to content

Commit

Permalink
feat: enable github CI test
Browse files Browse the repository at this point in the history
Trigger CI on push/pr on [main]
Run build & tests
  • Loading branch information
lslzl3000 committed Apr 19, 2023
1 parent 6d5d6a8 commit 3139051
Show file tree
Hide file tree
Showing 5 changed files with 620 additions and 9 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI auto test on push

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7

- name: Setup node 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm

- name: Install deps
run: pnpm install

- name: Test Build
run: pnpm run build

- name: Test in Electron
run: pnpm run test:ci

9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
"minify:es": "uglifyjs dist/orillusion.es.js -o dist/orillusion.es.js -c -m",
"test": "electron test/ci/main.js",
"test:install": "npm i electron@npm:electron-nightly@latest --no-save",
"test:ci": "xvfb-maybe -- electron test/ci/main.js",
"test:install": "pnpm i electron@npm:electron-nightly@latest xvfb-maybe -O",
"docs": "npm run docs:core && npm run docs:physics && npm run docs:media",
"docs:typedoc": "npx typedoc --plugin typedoc-plugin-markdown --plugin ./script/typedoc-plugin-not-exported.js --tsconfig tsconfig.build.json --gitRevision main --hideBreadcrumbs true --allReflectionsHaveOwnDocument true --readme none --excludeInternal --excludePrivate --excludeProtected --sort source-order --out",
"docs:core": "npm run docs:typedoc docs/api src/index.ts",
Expand All @@ -32,12 +33,14 @@
"docs:stats": "npm run docs:typedoc docs/stats src/libs/stats/index.ts"
},
"devDependencies": {
"@orillusion/core": "link:src",
"@orillusion/physics": "link:src/libs/physics",
"@webgpu/types": "^0.1.30",
"typedoc": "^0.24.4",
"typedoc-plugin-markdown": "^3.15.1",
"typescript": "^4.9.5",
"vite": "^4.2.2"
},
"optionalDependencies": {
"electron": "npm:electron-nightly@latest",
"xvfb-maybe": "^0.2.1"
}
}

0 comments on commit 3139051

Please sign in to comment.