-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to dart 3.0.0 * Update license
- Loading branch information
Showing
17 changed files
with
379 additions
and
232 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 |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Checkout | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "master" | ||
- "develop" | ||
- "feature/**" | ||
- "bugfix/**" | ||
- "hotfix/**" | ||
- "support/**" | ||
paths: | ||
- "lib/**.dart" | ||
- "test/**.dart" | ||
- "example/**.dart" | ||
- "pubspec.yaml" | ||
pull_request: | ||
branches: | ||
- "master" | ||
- "develop" | ||
- "feature/**" | ||
- "bugfix/**" | ||
- "hotfix/**" | ||
- "support/**" | ||
paths: | ||
- "lib/**.dart" | ||
- "test/**.dart" | ||
- "example/**.dart" | ||
- "pubspec.yaml" | ||
|
||
jobs: | ||
checkout: | ||
name: "Checkout" | ||
runs-on: ubuntu-latest | ||
container: | ||
image: dart:beta | ||
defaults: | ||
run: | ||
working-directory: ./ | ||
timeout-minutes: 10 | ||
steps: | ||
- name: 🚂 Get latest code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: 🚃 Cache pub modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-ws-package | ||
with: | ||
path: | | ||
$PWD/.pub_cache/ | ||
key: ${{ runner.os }}-ws-${{ env.cache-name }}-${{ hashFiles('**/pubspec.yaml') }} | ||
|
||
- name: 🗄️ Export pub cache directory | ||
run: export PUB_CACHE=$PWD/.pub_cache/ | ||
|
||
- name: 👷 Install Dependencies | ||
timeout-minutes: 1 | ||
run: | | ||
dart pub get | ||
- name: 🔎 Check format | ||
timeout-minutes: 1 | ||
run: dart format --set-exit-if-changed -l 80 -o none . | ||
|
||
- name: 📈 Check analyzer | ||
timeout-minutes: 1 | ||
run: dart analyze --fatal-infos --fatal-warnings lib | ||
|
||
#- name: Check with pana | ||
# run: dart pub global activate pana && pana --json --no-warning --line-length 80 | ||
- name: 🧪 Run tests | ||
run: | | ||
dart test --coverage=coverage \ | ||
&& dart run coverage:format_coverage --lcov --in=coverage \ | ||
--out=coverage/lcov.info --report-on=lib | ||
- name: 📥 Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2.1.0 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: 🧮 Check Code Coverage | ||
uses: VeryGoodOpenSource/very_good_coverage@v1.2.1 | ||
with: | ||
path: coverage/lcov.info | ||
min_coverage: 90 | ||
#exclude: '**.g.dart **.freezed.dart' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,8 @@ doc | |
pubspec.lock | ||
coverage* | ||
|
||
# Test | ||
.coverage/ | ||
/test/**/*.json | ||
/test/.test_coverage.dart | ||
log.pana.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
// https://pub.dev/packages/test | ||
// dart test test/ws_test.dart --color --platform=vm | ||
{ | ||
"name": "Test (VM)", | ||
"request": "launch", | ||
"type": "dart", | ||
"program": "test/platform_info_test.dart", | ||
"env": { | ||
"ENVIRONMENT": "test" | ||
}, | ||
"console": "debugConsole", | ||
"runTestsOnDevice": false, | ||
"templateFor": "test", | ||
"toolArgs": [ | ||
"--color", | ||
"--debug", | ||
"--coverage=.coverage", | ||
"--reporter=expanded", | ||
"--platform=vm", // chrome | ||
"--file-reporter=json:.coverage/tests.json", | ||
"--timeout=30s", | ||
"--concurrency=12" | ||
], | ||
"args": [] | ||
}, | ||
// dart test test/ws_test.dart --color --platform=chrome | ||
{ | ||
"name": "Test (Browser)", | ||
"request": "launch", | ||
"type": "dart", | ||
"program": "test/platform_info_test.dart", | ||
"env": { | ||
"ENVIRONMENT": "test" | ||
}, | ||
"console": "debugConsole", | ||
"runTestsOnDevice": false, | ||
"templateFor": "test", | ||
"toolArgs": [ | ||
"--color", | ||
"--debug", | ||
"--coverage=.coverage", | ||
"--reporter=expanded", | ||
"--platform=chrome", | ||
"--file-reporter=json:.coverage/tests.json", | ||
"--timeout=30s", | ||
"--concurrency=12" | ||
], | ||
"args": [] | ||
} | ||
] | ||
} |
Oops, something went wrong.
5bc8a12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
platform-info – ./
platform-info-plugfox.vercel.app
platform-info-git-master-plugfox.vercel.app
platform-info.vercel.app