-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #33.
- Loading branch information
Showing
3 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
name: Code Checking | ||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
paths: | ||
- "**.dart" | ||
|
||
jobs: | ||
code-check: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Unit Testing | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "package/lib/**" | ||
- "package/test/**" | ||
|
||
jobs: | ||
test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
actions: read | ||
checks: write | ||
defaults: | ||
run: | ||
working-directory: package/ | ||
env: | ||
FLUTTER_TEST_REPORT: ${{github.workspace}}/flutter-test-report.json | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: stable | ||
flutter-version: 3.x | ||
|
||
- name: Flutter version | ||
run: flutter --version | ||
|
||
- name: Get dependencies | ||
run: flutter pub get | ||
|
||
- name: Run unit tests | ||
run: flutter test --file-reporter="json:${{ env.FLUTTER_TEST_REPORT }}" | ||
|
||
- name: Write test report | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() | ||
with: | ||
name: Test Report | ||
path: ${{ env.FLUTTER_TEST_REPORT }} | ||
reporter: flutter-json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters