chore(ci): add a workflow to test the code
This commit is contained in:
parent
7aa5ce6e56
commit
cad975117c
|
|
@ -0,0 +1,31 @@
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
|
checks: 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