Repository navigation
Default TRUST_PROXY to 0 in the bundled Docker Compose files #6033
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: Lint and Format Check | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ '*' ] | |
| jobs: | |
| lint-and-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check insforge-dev skill copies are in sync | |
| run: scripts/sync-skills.sh --check | |
| - name: Check deploy/setup.sh invariants | |
| run: sh scripts/check-setup-sh.sh | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45 | |
| with: | |
| files: | | |
| **/*.{ts,tsx,js,jsx,mjs,cjs} | |
| - name: Run ESLint on changed files | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: npx eslint ${{ steps.changed-files.outputs.all_changed_files }} | |
| - name: Get changed files for Prettier | |
| id: changed-files-prettier | |
| uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45 | |
| - name: Check Prettier formatting on changed files | |
| if: steps.changed-files-prettier.outputs.any_changed == 'true' | |
| run: npx prettier --check --ignore-unknown ${{ steps.changed-files-prettier.outputs.all_changed_files }} | |
| - name: Get changed OpenAPI specs | |
| id: changed-openapi | |
| uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45 | |
| with: | |
| files: openapi/**/*.yaml | |
| separator: "\n" | |
| # safe_output escapes the separator newline onto the end of every path but the last. | |
| safe_output: false | |
| - name: Validate changed OpenAPI specs | |
| if: steps.changed-openapi.outputs.any_changed == 'true' | |
| # The file list arrives through the environment rather than being | |
| # interpolated into the script, so a filename cannot be read as shell | |
| # syntax. Newline separated and read line by line so a name containing | |
| # spaces stays one argument. | |
| env: | |
| CHANGED_SPECS: ${{ steps.changed-openapi.outputs.all_changed_files }} | |
| run: | | |
| while IFS= read -r spec; do | |
| [ -n "$spec" ] || continue | |
| echo "Validating $spec" | |
| npx --yes @apidevtools/[email protected] validate "$spec" | |
| done <<< "$CHANGED_SPECS" | |
| - name: Run TypeScript type checking | |
| run: npm run typecheck |