Skip to content

Commit

Permalink
add github actions yml
Browse files Browse the repository at this point in the history
  • Loading branch information
doehyunbaek committed Nov 24, 2023
1 parent eebce27 commit adb3b32
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/offline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: offline tests

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: jetli/[email protected]
with:
version: 'latest'
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '19.x'
- run: npm install
- run: npm run build-full
- run: |
if npm test node offline | grep -q '✗'; then
exit 1
else
echo "SUCCESS"
fi
25 changes: 25 additions & 0 deletions .github/workflows/online.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: online tests

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: jetli/[email protected]
with:
version: 'latest'
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '19.x'
- run: npm install
- run: npm run build-full
- run: npm test online
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"scripts": {
"build": "tsc && node ./build.js",
"build-wasabi": "git submodule init && git submodule update --remote && cd wasabi/crates/wasabi_js && npm run build && wasm-pack build --target web && wasm-pack build --target nodejs --out-dir ../../../dist/wasabi && cd ../../..",
"build-wasabi": "cd wasabi/crates/wasabi_js && npm run build && wasm-pack build --target web && wasm-pack build --target nodejs --out-dir ../../../dist/wasabi && cd ../../..",
"build-full": "npm run build-wasabi && npm run build",
"test": "npm run build && node ./dist/tests/run-tests.cjs",
"clean-tests": "node ./dist/tests/clean-tests.cjs",
Expand Down
4 changes: 4 additions & 0 deletions tests/run-tests.cts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ async function runOnlineTests(names: string[]) {
'ffmpeg',
'sandspiel',
'image-convolute',
'guiicons',
'handy-tools',
'riconpacker',
'rtexviewer',
'javascriptcore',
]
names = names.filter((n) => !filter.includes(n))
Expand Down

0 comments on commit adb3b32

Please sign in to comment.