tests: drop runtime fetch plumbing and simplify test wrapper (#542) #877
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: Popcorn build & test | |
| on: | |
| push: | |
| branches: ["**"] | |
| paths: | |
| - "popcorn/elixir/**" | |
| - "popcorn/js/**" | |
| - ".github/**" | |
| - "!.github/workflows/demo_*" | |
| - "!.github/workflows/local_*" | |
| - "!.github/workflows/release_*" | |
| - ".github/workflows/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: popcorn/elixir | |
| 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: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: popcorn/elixir/deps | |
| key: ${{ runner.os }}-mix-root-${{ hashFiles('popcorn/elixir/mix.lock') }} | |
| restore-keys: ${{ runner.os }}-mix-root- | |
| - name: Install Hex dependencies | |
| run: mix deps.get | |
| - name: Install JS dependencies | |
| working-directory: . | |
| run: pnpm install | |
| - name: Build AtomVM Unix | |
| uses: ./.github/actions/build-atomvm | |
| with: | |
| working-directory: popcorn/elixir | |
| build-mode: debug-unix | |
| outdir: atomvm-build/unix | |
| cmake-opts: "SANITIZER=OFF DEBUG_ASSERTIONS=ON DEBUG_GC=ON" | |
| - name: Build AtomVM WASM | |
| uses: ./.github/actions/build-atomvm | |
| with: | |
| working-directory: popcorn/elixir | |
| build-mode: debug-wasm | |
| outdir: atomvm-build/wasm | |
| - name: Configure runtime source | |
| run: | | |
| printf '\nconfig :popcorn, runtime: {:path, "atomvm-build/$target"}\n' >> config/config.exs | |
| - name: Setup Playwright | |
| uses: ./.github/actions/setup-playwright | |
| with: | |
| cache-prefix: popcorn-root | |
| lockfile: popcorn/elixir/mix.lock | |
| - name: Lint | |
| run: mix lint | |
| - name: Run tests | |
| run: mix test | |
| - name: Run WASM tests | |
| run: TARGET=wasm mix test |