Skip to content

Add CI

Add CI #19

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
FLUTTER_VERSION: 3.16.9
jobs:
formatting:
name: "Check Formatting"
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
- name: Install dependencies
run: flutter pub get
- name: Check formatting
run: dart format -o none --set-exit-if-changed lib/* test/*
analysis:
name: "Static Analysis"
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
- name: Install dependencies
run: flutter pub get
- name: Run analysis
run: flutter analyze
build:
strategy:
fail-fast: false
matrix:
include:
- os: windows-2022
build-option: "windows"
artifact-name: Dashboard2024-Windows
- os: macos-14
build-option: "macos"
artifact-name: Dashboard2024-macOS
- os: ubuntu-22.04
build-option: "linux"
artifact-name: Dashboard2024-linux
name: "Build - ${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install flutter deps
if: ${{ matrix.build-option == 'linux' }}
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
cache-path: ${{ runner.tool_cache }}/flutter/${{ matrix.build-option }}
- name: Get dependencies
run: flutter pub get
- name: Build app
run: flutter build ${{ matrix.build-option }}