Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty committed Feb 11, 2024
1 parent 9164ef6 commit 4a7b6fc
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.dart text eol=lf
90 changes: 90 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
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 }}
9 changes: 9 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true
comment: false
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ void networkTables() async {
}
}

// void toggleFullScreen(bool fullScreenState) {
// void toggleFullScreen(bool fullScreenState) {
// fullScreenState = !fullScreenState;
// if (fullScreenState) {
// FullscreenWindow.enterFullscreen();
// } else {
// FullscreenWindow.exitFullscreen();
// }
// }
// }
4 changes: 3 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: '>=3.2.6 <4.0.0'
# sdk: '>=3.2.6 <4.0.0'
sdk: '^3.2.0'


# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand Down

0 comments on commit 4a7b6fc

Please sign in to comment.