name: Portable Eve contracts and browser lowering on: push: branches: - main - "codex/**" pull_request: workflow_dispatch: jobs: contracts-and-browser: name: ${{ matrix.os }} ${{ matrix.package }} runs-on: ${{ matrix.os }} timeout-minutes: 15 strategy: fail-fast: false matrix: os: [windows-latest, ubuntu-latest] package: [eve-contracts, eve-browser-lowering] steps: - name: Check out Eve uses: actions/checkout@v4 - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: 24 cache: npm cache-dependency-path: packages/${{ matrix.package }}/package-lock.json # eve-browser-lowering links eve-contracts as file:../eve-contracts; npm installs none of the # linked package's dependencies, and tsc resolves its declarations from the real path, so # ajv must be installed in eve-contracts itself. - name: Install eve-contracts dependencies if: matrix.package != 'eve-contracts' working-directory: packages/eve-contracts run: npm ci - name: Install package dependencies working-directory: packages/${{ matrix.package }} run: npm ci - name: Build and test source working-directory: packages/${{ matrix.package }} run: npm test - name: Reject stale generated output shell: pwsh run: | $changed = git diff --ignore-space-at-eol --name-only -- packages/${{ matrix.package }} if ($changed) { git diff --ignore-space-at-eol -- packages/${{ matrix.package }} throw "The package build changed checked-in generated output." }