Add Forgejo Actions CI for monorepo
Some checks failed
ci / backend (push) Failing after 13s
ci / flutter (push) Failing after 2s

This commit is contained in:
oskar 2026-01-15 23:23:57 +01:00
parent a08da17f17
commit 9719f8efc3

View file

@ -7,48 +7,27 @@ on:
- "front001/**" - "front001/**"
- ".forgejo/workflows/**" - ".forgejo/workflows/**"
pull_request: pull_request:
paths:
- "back001/**"
- "front001/**"
- ".forgejo/workflows/**"
jobs: jobs:
backend: backend:
runs-on: docker runs-on: docker
# uruchamiaj backend tylko gdy zmiany dotyczą back001 lub workflowów
if: >
contains(join(github.event.head_commit.added, ' '), 'back001/') ||
contains(join(github.event.head_commit.modified, ' '), 'back001/') ||
contains(join(github.event.head_commit.removed, ' '), 'back001/') ||
github.event_name == 'pull_request'
container: container:
image: gradle:8.7-jdk21 image: gradle:8.7-jdk21
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Test + build (backend) - name: Test + build (backend)
# ważne: monorepo -> ustawiamy working dir
working-directory: back001 working-directory: back001
run: | run: ./gradlew test build --no-daemon
./gradlew test build --no-daemon
flutter: flutter:
runs-on: docker runs-on: docker
# uruchamiaj flutter tylko gdy zmiany dotyczą front001 lub workflowów
if: >
contains(join(github.event.head_commit.added, ' '), 'front001/') ||
contains(join(github.event.head_commit.modified, ' '), 'front001/') ||
contains(join(github.event.head_commit.removed, ' '), 'front001/') ||
github.event_name == 'pull_request'
container: container:
image: ghcr.io/cirruslabs/flutter:stable image: ghcr.io/cirruslabs/flutter:stable
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Analyze + test (flutter) - name: Analyze + test (flutter)
working-directory: front001/mosenioring working-directory: front001/mosenioring
run: | run: |
flutter --version
flutter pub get flutter pub get
flutter analyze flutter analyze
flutter test flutter test