2026-01-15 23:20:07 +01:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
paths:
|
|
|
|
|
- "back001/**"
|
|
|
|
|
- "front001/**"
|
|
|
|
|
- ".forgejo/workflows/**"
|
2026-01-16 14:27:30 +01:00
|
|
|
- "ci/**"
|
2026-01-15 23:20:07 +01:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
|
|
jobs:
|
2026-01-16 15:37:53 +01:00
|
|
|
changes:
|
|
|
|
|
runs-on: docker
|
|
|
|
|
steps:
|
2026-01-16 21:44:46 +01:00
|
|
|
- uses: https://github.com/actions/checkout@v4
|
2026-01-16 22:09:28 +01:00
|
|
|
with:
|
|
|
|
|
fetch-depth: 0
|
2026-01-16 15:37:53 +01:00
|
|
|
|
|
|
|
|
- id: filter
|
2026-01-16 21:44:46 +01:00
|
|
|
uses: https://github.com/dorny/paths-filter@v3
|
2026-01-16 15:37:53 +01:00
|
|
|
with:
|
|
|
|
|
filters: |
|
|
|
|
|
backend:
|
|
|
|
|
- 'back001/**'
|
|
|
|
|
- '.forgejo/workflows/**'
|
|
|
|
|
- 'ci/**'
|
|
|
|
|
frontend:
|
|
|
|
|
- 'front001/**'
|
|
|
|
|
- '.forgejo/workflows/**'
|
|
|
|
|
- 'ci/**'
|
|
|
|
|
outputs:
|
|
|
|
|
backend: ${{ steps.filter.outputs.backend }}
|
|
|
|
|
frontend: ${{ steps.filter.outputs.frontend }}
|
|
|
|
|
|
2026-01-15 23:20:07 +01:00
|
|
|
backend:
|
2026-01-16 15:37:53 +01:00
|
|
|
needs: changes
|
|
|
|
|
if: needs.changes.outputs.backend == 'true'
|
2026-01-15 23:20:07 +01:00
|
|
|
runs-on: docker
|
|
|
|
|
container:
|
2026-01-16 15:08:02 +01:00
|
|
|
image: forgejo.okit.pl/oskar/ci-gradle-node:8.7-jdk17
|
2026-01-15 23:20:07 +01:00
|
|
|
steps:
|
2026-01-16 21:44:46 +01:00
|
|
|
- uses: https://github.com/actions/checkout@v4
|
2026-01-16 14:10:17 +01:00
|
|
|
|
2026-01-16 21:44:46 +01:00
|
|
|
- uses: https://github.com/actions/cache@v4
|
2026-01-16 14:27:30 +01:00
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
/home/gradle/.gradle/caches
|
|
|
|
|
/home/gradle/.gradle/wrapper
|
|
|
|
|
key: gradle-${{ runner.os }}-${{ hashFiles('back001/**/*.gradle*', 'back001/**/gradle-wrapper.properties') }}
|
|
|
|
|
restore-keys: |
|
|
|
|
|
gradle-${{ runner.os }}-
|
2026-01-16 14:10:17 +01:00
|
|
|
|
2026-01-15 23:20:07 +01:00
|
|
|
- name: Test + build (backend)
|
|
|
|
|
working-directory: back001
|
2026-01-15 23:23:57 +01:00
|
|
|
run: ./gradlew test build --no-daemon
|
2026-01-15 23:20:07 +01:00
|
|
|
|
|
|
|
|
flutter:
|
2026-01-16 15:37:53 +01:00
|
|
|
needs: changes
|
|
|
|
|
if: needs.changes.outputs.frontend == 'true'
|
2026-01-15 23:20:07 +01:00
|
|
|
runs-on: docker
|
|
|
|
|
container:
|
2026-01-16 14:32:39 +01:00
|
|
|
image: forgejo.okit.pl/oskar/ci-flutter-node:stable
|
2026-01-15 23:20:07 +01:00
|
|
|
steps:
|
2026-01-16 21:44:46 +01:00
|
|
|
- uses: https://github.com/actions/checkout@v4
|
2026-01-16 14:27:30 +01:00
|
|
|
|
2026-01-16 21:44:46 +01:00
|
|
|
- uses: https://github.com/actions/cache@v4
|
2026-01-16 14:27:30 +01:00
|
|
|
with:
|
|
|
|
|
path: |
|
|
|
|
|
/root/.pub-cache
|
|
|
|
|
key: pub-${{ runner.os }}-${{ hashFiles('front001/mosenioring/pubspec.lock') }}
|
|
|
|
|
restore-keys: |
|
|
|
|
|
pub-${{ runner.os }}-
|
2026-01-16 14:10:17 +01:00
|
|
|
|
2026-01-16 15:21:22 +01:00
|
|
|
- name: Pub get
|
2026-01-15 23:20:07 +01:00
|
|
|
working-directory: front001/mosenioring
|
2026-01-16 15:21:22 +01:00
|
|
|
run: flutter pub get
|
|
|
|
|
|
|
|
|
|
- name: Analyze (non-blocking for now)
|
|
|
|
|
working-directory: front001/mosenioring
|
|
|
|
|
run: flutter analyze || true
|
|
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
|
working-directory: front001/mosenioring
|
|
|
|
|
run: flutter test
|