Implement complete Guix transpiler: Go-based UI language to WebAssembly #6
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: E2E Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| playwright: | |
| name: Playwright Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Build CLI | |
| run: go build -o guix ./cmd/guix | |
| - name: Generate and build counter example | |
| run: | | |
| ./guix generate -p examples/counter | |
| cd examples/counter | |
| cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" . | |
| GOOS=js GOARCH=wasm go build -o main.wasm . | |
| - name: Install Playwright | |
| working-directory: examples/counter | |
| run: | | |
| npm init -y | |
| npm install -D @playwright/test | |
| npx playwright install --with-deps chromium | |
| - name: Run Playwright tests | |
| working-directory: examples/counter | |
| run: npx playwright test | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-results | |
| path: examples/counter/test-results/ | |
| retention-days: 7 |