name: pre-commit on: push: branches: [main] pull_request: branches: [main] jobs: pre-commit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # Hooks here delegate to the shared gates in kuhyx/utils. Without this # checkout they exit 1 with "shared gate not found at # /home/runner/utils/..." -- which is what this workflow was doing on # every run since those hooks were added. - name: Check out the shared gates uses: actions/checkout@v4 with: repository: kuhyx/utils path: .utils - name: Point the delegates at that checkout run: echo "UTILS_ROOT=$GITHUB_WORKSPACE/.utils" >> "$GITHUB_ENV" - uses: actions/setup-python@v5 with: python-version: "3.x" # The flutter-analyze pre-commit hook shells out to `flutter analyze` in # stronglift_replacement/workout_app. Pin to the version the app is # developed against (Dart SDK ^3.12.2) so CI's analyzer matches local. - uses: subosito/flutter-action@v2 with: flutter-version: 3.47.4 channel: stable cache: true # The web-lint / web-typecheck / web-coverage hooks run npm inside web/. # Without its installed packages `tsc --build` cannot find the # 'vite/client' and 'node' type libraries and fails with TS2688 -- which # is what this workflow had been doing on every run since the status UI # landed in 8f91158. - uses: actions/setup-node@v4 with: node-version: "24.21.0" cache: npm cache-dependency-path: web/package-lock.json - name: Install status-UI packages run: npm ci working-directory: web - name: Install dependencies run: pip install -r requirements.txt # analyze needs resolved packages (.dart_tool); the hook runs analyze # only, so fetch deps here first. - name: Resolve Flutter packages run: flutter pub get working-directory: stronglift_replacement/workout_app - uses: pre-commit/action@v3.0.1