This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nyxx-discord/next
Release 2.0.0
- Loading branch information
Showing
15 changed files
with
264 additions
and
336 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,30 +4,38 @@ on: | |
push: | ||
branches: | ||
- dev | ||
- next | ||
|
||
jobs: | ||
deploy-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pub_cache | ||
key: ${{ runner.os }} | ||
|
||
- name: Setup Dart Action | ||
uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pub-cache | ||
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pubspec- | ||
- name: Install dependencies | ||
run: dart pub get | ||
|
||
- name: Generate docs | ||
run: dartdoc | ||
|
||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
|
||
- name: Deploy nyxx dev docs | ||
uses: easingthemes/[email protected] | ||
env: | ||
|
@@ -36,4 +44,4 @@ jobs: | |
SOURCE: "doc/api/" | ||
REMOTE_HOST: ${{ secrets.DEPLOY_REMOTE_HOST }} | ||
REMOTE_USER: ${{ secrets.DEPLOY_REMOTE_USER }} | ||
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx_lavalink/" | ||
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx_lavalink/${{ steps.extract_branch.outputs.branch }}/" |
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 |
---|---|---|
|
@@ -12,18 +12,20 @@ jobs: | |
env: | ||
TEST_TOKEN: ${{ secrets.TEST_TOKEN }} | ||
steps: | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pub_cache | ||
key: ${{ runner.os }} | ||
|
||
- name: Setup Dart Action | ||
uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pub-cache | ||
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pubspec- | ||
- name: Install dependencies | ||
run: dart pub get | ||
|
||
|
@@ -36,73 +38,22 @@ jobs: | |
env: | ||
TEST_TOKEN: ${{ secrets.TEST_TOKEN }} | ||
steps: | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pub_cache | ||
key: ${{ runner.os }} | ||
|
||
- name: Setup Dart Action | ||
uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Install dependencies | ||
run: dart pub get | ||
|
||
- name: Format | ||
run: dart format --set-exit-if-changed -l 160 ./lib | ||
|
||
tests: | ||
needs: [ format, analyze ] | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_TOKEN: ${{ secrets.TEST_TOKEN }} | ||
steps: | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pub_cache | ||
key: ${{ runner.os }} | ||
|
||
- name: Setup Dart Action | ||
uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Install lcov | ||
run: sudo apt-get install -y lcov | ||
|
||
- name: Checkout | ||
uses: actions/[email protected] | ||
path: ~/.pub-cache | ||
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-pubspec- | ||
- name: Install dependencies | ||
run: dart pub get | ||
|
||
- name: Unit tests | ||
run: dart run test --coverage="coverage" test/unit/** | ||
|
||
- name: Integration tests | ||
run: dart run test --coverage="coverage" test/integration/** | ||
continue-on-error: true | ||
|
||
- name: Format coverage | ||
run: dart run coverage:format_coverage --lcov --in=coverage --out=coverage/coverage.lcov --packages=.packages --report-on=lib | ||
|
||
- name: Generate coverage | ||
run: genhtml coverage/coverage.lcov -o coverage/coverage_gen | ||
|
||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | ||
id: extract_branch | ||
|
||
- name: Deploy code coverage | ||
uses: easingthemes/[email protected] | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }} | ||
ARGS: '-rltDzvO --rsync-path="mkdir -p ${{ secrets.DEPLOY_REMOTE_TARGET }}/coverage/nyxx_lavalink/${{ steps.extract_branch.outputs.branch }}/ && rsync"' | ||
SOURCE: "coverage/coverage_gen/" | ||
REMOTE_HOST: ${{ secrets.DEPLOY_REMOTE_HOST }} | ||
REMOTE_USER: ${{ secrets.DEPLOY_REMOTE_USER }} | ||
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/coverage/nyxx_lavalink/${{ steps.extract_branch.outputs.branch }}/" | ||
- name: Format | ||
run: dart format --set-exit-if-changed -l 160 ./lib |
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,13 @@ | ||
# Files and directories created by pub. | ||
.dart_tool/ | ||
.packages | ||
|
||
# Conventional directory for build outputs. | ||
build/ | ||
|
||
# Omit committing pubspec.lock for library packages; see | ||
# https://dart.dev/guides/libraries/private-files#pubspeclock. | ||
pubspec.lock | ||
|
||
.idea/ | ||
.github/ |
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 |
---|---|---|
@@ -1,106 +1,13 @@ | ||
include: package:lints/recommended.yaml | ||
|
||
linter: | ||
rules: | ||
unrelated_type_equality_checks: false | ||
implementation_imports: false | ||
|
||
analyzer: | ||
exclude: [build/**, example/**] | ||
language: | ||
strict-raw-types: true | ||
strong-mode: | ||
implicit-casts: false | ||
linter: | ||
rules: | ||
- avoid_empty_else | ||
- comment_references | ||
- control_flow_in_finally | ||
- empty_statements | ||
- hash_and_equals | ||
- iterable_contains_unrelated_type | ||
- list_remove_unrelated_type | ||
- avoid_slow_async_io | ||
- cancel_subscriptions | ||
- test_types_in_equals | ||
- throw_in_finally | ||
- valid_regexps | ||
- always_declare_return_types | ||
- annotate_overrides | ||
- avoid_init_to_null | ||
- avoid_return_types_on_setters | ||
- await_only_futures | ||
- camel_case_types | ||
- constant_identifier_names | ||
- empty_constructor_bodies | ||
- library_names | ||
- library_prefixes | ||
- non_constant_identifier_names | ||
- only_throw_errors | ||
- package_api_docs | ||
- package_prefixed_library_names | ||
- prefer_is_not_empty | ||
- slash_for_doc_comments | ||
- type_init_formals | ||
- unnecessary_getters_setters | ||
- package_names | ||
- unnecessary_await_in_return | ||
- use_function_type_syntax_for_parameters | ||
- avoid_returning_null_for_future | ||
- no_duplicate_case_values | ||
- unnecessary_statements | ||
- always_require_non_null_named_parameters | ||
- always_put_required_named_parameters_first | ||
- avoid_catches_without_on_clauses | ||
- avoid_function_literals_in_foreach_calls | ||
- avoid_redundant_argument_values | ||
- avoid_returning_null | ||
- avoid_returning_null_for_void | ||
- avoid_returning_this | ||
- camel_case_extensions | ||
- curly_braces_in_flow_control_structures | ||
- directives_ordering | ||
- empty_catches | ||
- join_return_with_assignment | ||
- leading_newlines_in_multiline_strings | ||
- missing_whitespace_between_adjacent_strings | ||
- no_runtimeType_toString | ||
- null_closures | ||
- omit_local_variable_types | ||
- one_member_abstracts | ||
- prefer_adjacent_string_concatenation | ||
- prefer_collection_literals | ||
- prefer_conditional_assignment | ||
- prefer_const_constructors | ||
- prefer_const_constructors_in_immutables | ||
- prefer_const_declarations | ||
- prefer_const_literals_to_create_immutables | ||
- prefer_constructors_over_static_methods | ||
- prefer_contains | ||
- prefer_double_quotes | ||
- prefer_equal_for_default_values | ||
- prefer_expression_function_bodies | ||
- prefer_final_fields | ||
- prefer_final_in_for_each | ||
- prefer_final_locals | ||
- prefer_for_elements_to_map_fromIterable | ||
- prefer_foreach | ||
- prefer_function_declarations_over_variables | ||
- prefer_generic_function_type_aliases | ||
- prefer_if_elements_to_conditional_expressions | ||
- prefer_if_null_operators | ||
- prefer_initializing_formals | ||
- prefer_inlined_adds | ||
- prefer_int_literals | ||
- prefer_interpolation_to_compose_strings | ||
- prefer_is_empty | ||
- provide_deprecation_message | ||
- prefer_typing_uninitialized_variables | ||
- public_member_api_docs | ||
- unawaited_futures | ||
- unnecessary_brace_in_string_interps | ||
- unnecessary_lambdas | ||
- unnecessary_null_in_if_null_operators | ||
- unnecessary_parenthesis | ||
- unnecessary_raw_strings | ||
- unnecessary_string_escapes | ||
- use_rethrow_when_possible | ||
- use_string_buffers | ||
- void_checks | ||
- use_to_and_as_if_applicable | ||
- sort_pub_dependencies | ||
- prefer_is_not_operator | ||
- prefer_iterable_whereType | ||
- prefer_mixin | ||
- prefer_null_aware_operators | ||
- prefer_spread_collections |
Oops, something went wrong.