-
-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (53 loc) · 1.87 KB
/
check_and_lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
on:
pull_request:
push:
branches:
- main
name: Check and Lint
jobs:
check_and_lint:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 #v2.7.0
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # 2.16.0
with:
channel: "main"
- name: Set up Java
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
with:
distribution: "temurin"
java-version: 17
- name: Install GTK
if: (matrix.os == 'ubuntu-latest')
run: sudo apt-get update && sudo apt-get install libgtk-3-dev
- name: Install ninja-build
if: (matrix.os == 'ubuntu-latest')
run: sudo apt-get update && sudo apt-get install ninja-build
- name: enable native assets
run: flutter config --enable-native-assets
- name: install melos
run: dart pub global activate melos
- name: melos boostrap
run: melos bootstrap
- name: flutter format
run: melos exec -c 1 dart format . --output=none --set-exit-if-changed
- name: flutter analyze
run: melos exec -c 1 flutter analyze
- name: native doctor
run: dart native_doctor/bin/native_doctor.dart --path example/flutter_package/example --yes
- name: futter test
run: melos exec -c 1 flutter test
# Run Dart test directly for the package (not through flutter)
- name: dart test
run: dart --enable-experiment=native-assets test
working-directory: example/dart_package
- name: dart run
run: dart --enable-experiment=native-assets run bin/dart_package_example.dart
working-directory: example/dart_package