refactor(forms-api): declarative per-form spam policy (#85) #271
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: Functions CI | |
| on: | |
| push: | |
| branches: [trunk] | |
| paths: | |
| - "functions/**" | |
| - ".github/workflows/functions-ci.yml" | |
| pull_request: | |
| branches: [trunk] | |
| paths: | |
| - "functions/**" | |
| - ".github/workflows/functions-ci.yml" | |
| jobs: | |
| build-and-lint: | |
| name: Build and Lint Functions | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/${{ github.repository }}:trunk | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install root dependencies | |
| run: bun install | |
| - name: Install functions dependencies | |
| working-directory: ./functions | |
| run: npm ci | |
| - name: Lint functions code | |
| working-directory: ./functions | |
| run: npm run lint | |
| - name: Typecheck production code | |
| working-directory: ./functions | |
| run: npm run typecheck | |
| - name: Build functions | |
| working-directory: ./functions | |
| run: npm run build | |
| - name: Typecheck tests | |
| working-directory: ./functions | |
| run: npm run typecheck:tests | |
| test-functions: | |
| name: Test Functions | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/${{ github.repository }}:trunk | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install root dependencies | |
| run: bun install | |
| - name: Install functions dependencies | |
| working-directory: ./functions | |
| run: npm ci | |
| - name: Test functions | |
| working-directory: ./functions | |
| run: bun test src/ |