diff --git a/.github/workflows/offline.yml b/.github/workflows/offline.yml new file mode 100644 index 00000000..c0b05559 --- /dev/null +++ b/.github/workflows/offline.yml @@ -0,0 +1,33 @@ +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/wasm-pack-action@v0.4.0 + 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 offline node + if: always() + - run: find ${GITHUB_WORKSPACE} -name "report.txt" -exec cp {} ${GITHUB_WORKSPACE}/reports \; + if: always() + - name: Upload report.txt files + uses: actions/upload-artifact@v3 + with: + name: report-files + path: ${GITHUB_WORKSPACE}/reports diff --git a/.github/workflows/online.yml b/.github/workflows/online.yml new file mode 100644 index 00000000..3e2e30b1 --- /dev/null +++ b/.github/workflows/online.yml @@ -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/wasm-pack-action@v0.4.0 + 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 diff --git a/package.json b/package.json index f97ad2a7..0d1f287c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tests/run-tests.cts b/tests/run-tests.cts index 82082c3d..cab2da45 100644 --- a/tests/run-tests.cts +++ b/tests/run-tests.cts @@ -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)) @@ -227,6 +231,7 @@ async function writeReport(name: string, report: TestReport) { process.stdout.write(`\u2713\n`) } else { process.stdout.write(`\u2717\t\t${testReportPath}\n`) + process.exitCode = 1 await fs.writeFile(testReportPath, report.reason) } }