ci: fix eslint & test reports continue even when previous is failing #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Build And Test' | |
on: [push, pull_request] | |
jobs: | |
Build-And-Test: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: 'Setup Emscripten' | |
uses: mymindstorm/setup-emsdk@v11 | |
- name: 'Setup Python' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: 'Install Meson & Ninja' | |
uses: BSFishy/pip-action@v1 | |
with: | |
packages: | | |
meson | |
ninja | |
- name: Write em.txt | |
uses: "DamianReeves/write-file-action@master" | |
with: | |
path: libultrahdr-wasm/em.txt | |
write-mode: overwrite | |
contents: | | |
[binaries] | |
c = 'emcc' | |
cpp = 'em++' | |
ar = 'emar' | |
nm = 'emnm' | |
[host_machine] | |
system = 'emscripten' | |
cpu_family = 'wasm32' | |
cpu = 'wasm32' | |
endian = 'little' | |
- name: 'Build libultrahdr WASM' | |
run: | | |
cd libultrahdr-wasm | |
meson setup build --cross-file=em.txt | |
meson compile -C build | |
- name: 'Setup Nodejs' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: 'Install npm packages' | |
run: npm ci | |
- name: 'Build' | |
run: npm run build | |
- name: 'Produce Reports' | |
run: npm run ci:check | |
if: success() || failure() | |
- name: 'Run tests' | |
run: npm run ci:test | |
if: success() || failure() | |
- name: 'Upload Build artifacts' | |
uses: actions/upload-artifact@v3 | |
if: success() || failure() | |
with: | |
name: build-artifact | |
if-no-files-found: error | |
path: | | |
libultrahdr-wasm/build/*.ts | |
libultrahdr-wasm/build/*.js | |
libultrahdr-wasm/build/*.map | |
libultrahdr-wasm/build/*.wasm | |
dist/ | |
reports/ |