Add Forgejo Actions CI for monorepo
This commit is contained in:
parent
7ba37539b1
commit
a08da17f17
55
.forgejo/workflows/ci.yml
Normal file
55
.forgejo/workflows/ci.yml
Normal 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
|
||||
|
||||
Loading…
Reference in a new issue