chore(ci): update CI to include format and analyze commands
This commit is contained in:
parent
37f1d5518e
commit
6e40955758
|
|
@ -0,0 +1,41 @@
|
||||||
|
name: Code Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- ready_for_review
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: "stable"
|
||||||
|
|
||||||
|
- name: Run Flutter Test
|
||||||
|
run: flutter test
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: Lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: subosito/flutter-action@v2
|
||||||
|
with:
|
||||||
|
channel: "stable"
|
||||||
|
|
||||||
|
- name: Run Flutter Format
|
||||||
|
run: dart format --set-exit-if-changed .
|
||||||
|
|
||||||
|
- name: Run Flutter Analyze
|
||||||
|
run: flutter analyze
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
name: release
|
name: release
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: [Test & Report]
|
workflows: [Code Check]
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
name: Test & Report
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
checks: write
|
|
||||||
statuses: write
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
name: Test & Report
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
channel: "stable"
|
|
||||||
|
|
||||||
- name: Get all Flutter Packages
|
|
||||||
run: flutter pub get
|
|
||||||
|
|
||||||
- name: Run Flutter Test
|
|
||||||
run: flutter test --machine > test-results.json
|
|
||||||
|
|
||||||
- name: Test Report
|
|
||||||
uses: dorny/test-reporter@v1
|
|
||||||
if: success() || failure()
|
|
||||||
with:
|
|
||||||
name: Test Results
|
|
||||||
path: test-results.json
|
|
||||||
reporter: dart-json
|
|
||||||
Loading…
Reference in New Issue