Add Forgejo Actions CI for monorepo
All checks were successful
ci / backend (push) Has been skipped
ci / flutter (push) Has been skipped

This commit is contained in:
oskar 2026-01-15 23:20:07 +01:00
parent 7ba37539b1
commit a08da17f17

55
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,55 @@
name: ci
on:
push:
paths:
- "back001/**"
- "front001/**"
- ".forgejo/workflows/**"
pull_request:
paths:
- "back001/**"
- "front001/**"
- ".forgejo/workflows/**"
jobs:
backend:
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:
image: gradle:8.7-jdk21
steps:
- uses: actions/checkout@v4
- name: Test + build (backend)
# ważne: monorepo -> ustawiamy working dir
working-directory: back001
run: |
./gradlew test build --no-daemon
flutter:
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:
image: ghcr.io/cirruslabs/flutter:stable
steps:
- uses: actions/checkout@v4
- name: Analyze + test (flutter)
working-directory: front001/mosenioring
run: |
flutter --version
flutter pub get
flutter analyze
flutter test