Add Flutter linter for mobile
The older version seemed to be disabled (it was getting triggered on a non-existent master branch), so I'm not sure if we want this on right now. But let's give it a go, will remove if it this needs some cleanup first.
This commit is contained in:
parent
fa7298daf2
commit
0062bc0fdd
19
.github/workflows/mobile-lint.yml
vendored
Normal file
19
.github/workflows/mobile-lint.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
name: "Lint (mobile)"
|
||||
|
||||
on:
|
||||
# Run on every push (this also covers pull requests)
|
||||
push:
|
||||
# But only if something changes inside mobile
|
||||
paths:
|
||||
- "mobile/**"
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- run: flutter pub get
|
||||
- run: flutter analyze --no-fatal-infos
|
||||
- run: flutter test
|
33
mobile/.github/workflows/code_quality.yml
vendored
33
mobile/.github/workflows/code_quality.yml
vendored
|
@ -1,33 +0,0 @@
|
|||
name: Check Linter Rules
|
||||
on:
|
||||
pull_request:
|
||||
types: [review_requested]
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
test:
|
||||
name: Check the source code
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ runner.tool_cache }}/flutter
|
||||
key: flutter-3.0.0-stable
|
||||
# Setup the flutter environment.
|
||||
- uses: subosito/flutter-action@v2.3.0
|
||||
with:
|
||||
channel: 'stable'
|
||||
flutter-version: '3.0.0'
|
||||
|
||||
# Fetch sub modules
|
||||
- run: git submodule update --init --recursive
|
||||
|
||||
# Get flutter dependencies.
|
||||
- name: Install packages
|
||||
run: flutter pub get
|
||||
|
||||
- name: Run Linter
|
||||
run: flutter analyze --no-fatal-infos
|
||||
- name: Run Test
|
||||
run: flutter test
|
Loading…
Reference in a new issue