tests: drop runtime fetch plumbing and simplify test wrapper (#542) #671
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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: Hello Popcorn - Build & test | |
| on: | |
| push: | |
| branches: ["**"] | |
| paths: | |
| - "**" | |
| - "!landing-page/**" | |
| - "!language-tour/**" | |
| - "!local-live-view/**" | |
| - "!examples/**" | |
| - "examples/hello-popcorn/**" | |
| - "!.github/**" | |
| - ".github/workflows/hello_popcorn_build_test.yml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CI: true | |
| MIX_ENV: test | |
| jobs: | |
| build: | |
| name: Build & test | |
| runs-on: ubuntu-22.04 | |
| defaults: | |
| run: | |
| working-directory: examples/hello-popcorn | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: ./.github/actions/setup-toolchain | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install JS dependencies | |
| run: pnpm install | |
| working-directory: . | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: examples/hello-popcorn/deps | |
| key: ${{ runner.os }}-mix-hello_popcorn-${{ hashFiles('examples/hello-popcorn/mix.lock') }} | |
| restore-keys: ${{ runner.os }}-mix-hello_popcorn- | |
| - name: Install Hex dependencies | |
| run: mix deps.get | |
| - name: Build AtomVM | |
| uses: ./.github/actions/build-atomvm | |
| with: | |
| working-directory: examples/hello-popcorn | |
| build-mode: debug-wasm | |
| outdir: popcorn_runtime_source/artifacts/wasm | |
| cmake-opts: "SANITIZER=OFF" | |
| - name: Configure runtime source | |
| run: | | |
| printf '\nconfig :popcorn, runtime: {:path, "popcorn_runtime_source/artifacts/$target"}\n' >> config/config.exs | |
| - name: Compile Hex dependencies | |
| run: mix deps.compile | |
| - name: Setup Playwright | |
| uses: ./.github/actions/setup-playwright | |
| with: | |
| cache-prefix: examples-hello-popcorn | |
| lockfile: examples/hello-popcorn/mix.lock | |
| - name: Build | |
| run: mix build | |
| - name: Run tests | |
| run: mix test --no-start |