ci: add TypeScript type-checking job to CI workflow #26
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| validate: | |
| name: Validate Pipeline Configs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python (for YAML validation) | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install PyYAML | |
| run: pip install pyyaml | |
| - name: Validate pipeline configs | |
| run: | | |
| for f in configs/pipelines/*.yaml; do | |
| echo "Checking $f..." | |
| python3 -c "import yaml, sys; yaml.safe_load(open('$f')) and print('OK:', '$f')" | |
| done | |
| lint-scripts: | |
| name: Lint Shell Scripts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run shellcheck | |
| uses: ludeeus/action-shellcheck@master | |
| with: | |
| scandir: "./scripts" | |
| typecheck: | |
| name: TypeScript Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: cd dagger && npm ci | |
| - name: TypeScript type check | |
| run: cd dagger && npx tsc --noEmit |