mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-11-10 21:07:14 +01:00
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
45 lines
1.5 KiB
YAML
45 lines
1.5 KiB
YAML
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.2
|
|
channel: stable
|
|
cache: true
|
|
- 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
|