Harden and refactor Bloblang WASM input handling #28
Workflow file for this run
This file contains hidden or 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: Bloblang Playground Tests | |
on: | |
push: | |
branches: [ main, develop ] | |
paths: | |
- 'blobl-editor/**' | |
- 'src/static/blobl.wasm' | |
- 'src/js/vendor/wasm_exec.js' | |
- 'tests/bloblang-playground/**' | |
- 'gulpfile.js' | |
pull_request: | |
branches: [ main, develop ] | |
paths: | |
- 'blobl-editor/**' | |
- 'src/static/blobl.wasm' | |
- 'src/js/vendor/wasm_exec.js' | |
- 'tests/bloblang-playground/**' | |
- 'gulpfile.js' | |
workflow_dispatch: | |
jobs: | |
test-bloblang-playground: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
cache: 'npm' | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22.x' | |
- name: Cache Go modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-1.22.x-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-1.22.x- | |
- name: Install dependencies | |
run: | | |
npm ci | |
cd blobl-editor/wasm && go mod download | |
- name: Lint Go code | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: latest | |
working-directory: blobl-editor/wasm | |
env: | |
GOOS: js | |
GOARCH: wasm | |
- name: Build and Test | |
run: npx gulp test:build | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-results | |
path: test-results.json | |