59 lines
1.3 KiB
YAML
59 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: |
|
|
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-Pfad zur PATH-Variable hinzufügen
|
|
echo "$(pwd)/flutter/bin" >> $GITHUB_PATH
|
|
# Alternativ für Docker/act:
|
|
echo "PATH=$(pwd)/flutter/bin:$PATH" >> $GITHUB_ENV
|
|
|
|
- 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 |