feat(cli): esc-plugin publish for marketplace artifacts (#9) #21
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: Tests | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npx tsx --test $(find tests -name '*.test.ts') | |
| # Build artifacts in build/ are committed because consumers install | |
| # this package via git ref (see .gitignore for context). Fail the | |
| # build if the committed output is out of date with src/, so a stale | |
| # build/ can never silently ship. | |
| - name: Verify committed build/ matches src/ | |
| if: matrix.node-version == 22 | |
| run: | | |
| if ! git diff --quiet -- build; then | |
| echo "::error::build/ is out of date with src/. Run 'npm run build' and commit the result." | |
| git status --short -- build | |
| git diff --stat -- build | |
| exit 1 | |
| fi |