56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
|
|
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
|
||
|
|
|