60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
name: Pull Request Pipeline
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
container: node:18-bullseye
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install jq
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y jq
|
|
|
|
- name: Install Flutter
|
|
run: |
|
|
# Flutter SDK herunterladen und entpacken
|
|
wget https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.35.6-stable.tar.xz
|
|
tar xf flutter_linux_3.35.6-stable.tar.xz
|
|
# Flutter zum PATH hinzufügen
|
|
echo "$(pwd)/flutter/bin" >> /usr/local/bin
|
|
# Flutter Doctor ausführen (optional)
|
|
flutter doctor -v
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Check Formatting
|
|
run: flutter analyze
|
|
|
|
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
needs: lint
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install jq
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y jq
|
|
|
|
- name: Set Up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: 'stable'
|
|
flutter-version: '3.35.0'
|
|
|
|
- name: Get dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Run Tests
|
|
run: flutter test |