Skip to content

Rework canteens

Rework canteens #142

Workflow file for this run

name: Lint, Test and Build
on:
pull_request:
branches:
- "development"
- "master"
paths:
- '.github/**'
- 'android/**'
- 'assets/**'
- 'fonts/**'
- 'ios/**'
- 'lib/**'
- 'linux/**'
- 'macos/**'
- 'test/**'
- 'windows/**'
- 'analysis_options.yaml'
- 'build.yaml'
- 'Makefile'
- 'pubspec.yaml'
- 'setup.sh'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter doctor -v
- name: Checkout code
uses: actions/checkout@v4
- name: Cache pub dependencies
uses: actions/cache@v4
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Resolving Dependencies
run: flutter pub get
- name: Build runner
run: dart run build_runner build --delete-conflicting-outputs && dart format lib/i18n/strings.g.dart
- name: Flutter analyzer
run: flutter analyze
- name: Check formatting
run: dart format -o none --set-exit-if-changed .
- name: Run tests
run: flutter test
- name: Build
run: flutter build apk --profile
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Profile build ${{ github.head_ref }}
path: build/app/outputs/flutter-apk/app-profile.apk