Repository navigation
feat: fix foundry issue #19
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: CI | |
| on: | |
| pull_request: | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - name: Ensure package.json has no version field | |
| run: | | |
| if node -e "process.exit(require('./package.json').version ? 1 : 0)"; then | |
| echo "OK: no version in package.json" | |
| else | |
| echo "::error::package.json must not have a version field (it is set by CI during publish)" | |
| exit 1 | |
| fi | |
| - name: Ensure README exports section is empty | |
| run: | | |
| node -e " | |
| const content = require('fs').readFileSync('README.md', 'utf8'); | |
| const between = content.match(/<!-- exports:start -->([\s\S]*?)<!-- exports:end -->/)?.[1] ?? null; | |
| if (between === null) { console.error('exports markers missing from README.md'); process.exit(1); } | |
| if (between.trim()) { console.error('README.md exports section must be empty (tree is generated at publish time)'); process.exit(1); } | |
| console.log('OK: exports section is empty'); | |
| " | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm lint | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@908c540300062bd5a7e473851cdb4282204cee09 # v1.9.1 | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm test |