-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
310 changed files
with
15,651 additions
and
8,505 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
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
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,75 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: [master, develop] | ||
|
||
env: | ||
FLUTTER_VERSION: 3.10.6 | ||
JAVA_VERSION: 11.x | ||
|
||
jobs: | ||
format: | ||
name: "Format" | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./uni | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ env.FLUTTER_VERSION }} | ||
|
||
- run: dart format $(find . -type f -name "*.dart" -a -not -name "*.g.dart" -a -not -name "*.mocks.dart") --set-exit-if-changed | ||
|
||
lint: | ||
name: "Lint" | ||
runs-on: ubuntu-latest | ||
needs: format | ||
defaults: | ||
run: | ||
working-directory: ./uni | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
distribution: "zulu" | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ env.FLUTTER_VERSION }} | ||
|
||
- name: Cache pub dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.FLUTTER_HOME }}/.pub-cache | ||
key: ${{ runner.os }}-pub-${{ github.ref }}-${{ hashFiles('**/pubspec.lock') }} | ||
restore-keys: ${{ runner.os }}-pub-${{ github.ref }}- | ||
|
||
- run: flutter analyze . | ||
|
||
test: | ||
name: "Test" | ||
runs-on: ubuntu-latest | ||
needs: lint | ||
defaults: | ||
run: | ||
working-directory: ./uni | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ env.JAVA_VERSION }} | ||
distribution: "zulu" | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: ${{ env.FLUTTER_VERSION }} | ||
|
||
- name: Test with coverage | ||
run: flutter test --coverage | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true |
This file was deleted.
Oops, something went wrong.
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
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,37 @@ | ||
# see https://docs.codecov.io/docs/codecov-yaml | ||
# Validation check: | ||
# $ curl --data-binary @codecov.yml https://codecov.io/validate | ||
|
||
ignore: | ||
- "**/*.g.dart" | ||
- "!**/lib/**" # ignore all files outside of lib | ||
|
||
codecov: | ||
require_ci_to_pass: yes | ||
notify: | ||
wait_for_ci: yes | ||
|
||
coverage: | ||
precision: 0 # 2 = xx.xx%, 0 = xx% | ||
round: up # how coverage is rounded: down/up/nearest | ||
range: 40...100 # custom range of coverage colors from red -> yellow -> green | ||
status: | ||
project: | ||
default: | ||
informational: true | ||
target: 70% # specify the target coverage for each commit status | ||
threshold: 10% # allow this decrease on project | ||
if_ci_failed: error | ||
patch: | ||
default: | ||
informational: true | ||
threshold: 50% # allow this decrease on patch | ||
changes: false | ||
|
||
github_checks: | ||
annotations: false | ||
|
||
comment: | ||
layout: header, diff | ||
require_changes: false | ||
behavior: default |
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,15 @@ | ||
#!/bin/sh | ||
mkdir -p .git/hooks #it seems that are some cases where git will not create a hook directory if someone removed the hook templates | ||
tee .git/hooks/pre-commit << EOF | ||
#!/bin/sh | ||
FILES="\$(git diff --name-only --cached | grep .*\.dart | grep -v .*\.g\.dart | grep -v .*\.mocks\.dart)" | ||
[ -z "\$FILES" ] && exit 0 | ||
echo "\$FILES" | xargs dart format | ||
echo "\$FILES" | xargs git add | ||
EOF | ||
|
||
chmod +x .git/hooks/pre-commit |
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
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
Oops, something went wrong.