Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from nyxx-discord/next
Browse files Browse the repository at this point in the history
Release 2.0.0
  • Loading branch information
l7ssha authored Dec 19, 2021
2 parents 3b04adf + 5abc820 commit 81ef52d
Show file tree
Hide file tree
Showing 15 changed files with 264 additions and 336 deletions.
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Please include a summary of the change and which issue is fixed. Please also inc

Use smart commits here to manipulate issues (eg. Fixes #issue)

## Connected issues & potential other potential problems
## Connected issues & other potential problems

If changes are connected to other issues or are affecting code in other parts of framework
(e.g. in main package or any subpackage) make sure to link and describe where and why problem could be present
If changes in PR are connected to other issues or are affecting code in other parts of framework
(e.g. in main package or any other subpackage) make sure to link issue/PR and describe said problem

## Type of change

Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}/"
13 changes: 12 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@ jobs:
nyxx_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-
- name: 'publish nyxx package to pub.dev'
id: publish
uses: k-paxian/dart-package-publisher@master
Expand All @@ -18,6 +28,7 @@ jobs:
force: true
suppressBuildRunner: true
credentialJson: ${{ secrets.CREDENTIAL_JSON }}

- name: 'Commit release tag'
if: steps.publish.outputs.success
uses: hole19/git-tag-action@master
Expand Down
77 changes: 14 additions & 63 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
13 changes: 13 additions & 0 deletions .pubignore
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/
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 2.0.0
__19.12.2021__

- Bump `nyxx` and `nyxx_interactions` to `3.0.0`
- Fixup names of classes
- Migrate to export/import model

## 2.0.0-dev.0

- Bump `nyxx` and `nyxx_interactions` to `3.0.0-dev.0`
- Fixup names of classes
- Migrate to export/import model

## 1.0.1

- Push fixup
Expand Down
113 changes: 10 additions & 103 deletions analysis_options.yaml
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
Loading

0 comments on commit 81ef52d

Please sign in to comment.