From acf2f40e6209520c85846752be3e4929d03a4f70 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Fri, 22 May 2026 16:21:34 +0200 Subject: [PATCH] Test database pipeline 3 --- .gitea/workflows/pull_request.yaml | 32 +++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/pull_request.yaml b/.gitea/workflows/pull_request.yaml index e0fc2ca..b99400a 100644 --- a/.gitea/workflows/pull_request.yaml +++ b/.gitea/workflows/pull_request.yaml @@ -119,6 +119,24 @@ jobs: channel: stable flutter-version: 3.41.0 + - name: Cache pub dependencies + uses: actions/cache@v4 + with: + path: | + ~/.pub-cache + key: pub-${{ runner.os }}-${{ hashFiles('**/pubspec.lock') }} + restore-keys: | + pub-${{ runner.os }}- + + - name: Cache build_runner outputs + uses: actions/cache@v4 + with: + path: | + .dart_tool/build + key: build-runner-${{ runner.os }}-${{ hashFiles('**/pubspec.lock') }} + restore-keys: | + build-runner-${{ runner.os }}- + - name: Get dependencies run: | git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-3.41.0-x64 @@ -126,13 +144,13 @@ jobs: - name: Check for generated database files run: | - dart run build_runner build --delete-conflicting-outputs + dart run build_runner build -# if [ -n "$(git status --porcelain '*.g.dart')" ]; then -# echo "Generated database files are out of date. Diff:" -# git --no-pager diff -- '*.g.dart' -# exit 1 -#fi + if [ -n "$(git status --porcelain '*.g.dart')" ]; then + echo "Generated database files are out of date. Diff:" + git --no-pager diff -- '*.g.dart' + exit 1 + fi -# echo "Generated database files are up to date." + echo "Generated database files are up to date."