Skip to content

Commit

Permalink
Update nyxx_lavalink to use nyxx 6.0.0 and Lavalink v4 (#16)
Browse files Browse the repository at this point in the history
* Update PULL_REQUEST_TEMPLATE.md

* Initial lavalink package implementation

* wip: Documentation

* wip: nyxx_lavalink implementation

* Filter voice state updates to only trigger on the bot's own state updated

* Fix deserialization of websocket closed events

* Add more methods to LavalinkPlayer

* Export package:lavalink

* Fix snowflake parsing

* Add HTTP only Lavalink client

* Add methods to LavalinkPlugin for loading tracks

* Close streams associated with player on disconnection

* Update example to use search

* Remove application.yml.example from version control

* Update workflows to work for both packages

* Format files

* Correct test command

* Add dev_dependencies for package:nyxx_lavalink

* Document package:lavalink

* Move metadata files to appropriate package folder

* Prepare nyxx_lavalink for release

* Update README.md

* Reference required lavalink server version in README

* Document nyxx_lavalink

* Add method on LavalinkPlugin for connecting to Lavalink

* Correct lavalink version constraint

* Add .gitkeep files in test directories

* Revert test workflow back to `dart run test`

---------

Co-authored-by: Szymon Uglis <[email protected]>
  • Loading branch information
abitofevrything and l7ssha authored Dec 9, 2023
1 parent 665fd53 commit 1b7137a
Show file tree
Hide file tree
Showing 91 changed files with 2,868 additions and 2,205 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Please delete options that are not relevant.
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have checked my changes haven't lowered code coverage
4 changes: 4 additions & 0 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@ jobs:
${{ runner.os }}-pubspec-
- name: Install dependencies
working-directory: packages/nyxx_lavalink
run: dart pub get

- name: Generate docs
working-directory: packages/nyxx_lavalink
run: dart doc

- name: Extract branch name
working-directory: packages/nyxx_lavalink
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Deploy nyxx dev docs
working-directory: packages/nyxx_lavalink
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ on:
- main

jobs:
nyxx_publish:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
package: [lavalink, nyxx_lavalink]

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -20,9 +24,10 @@ jobs:
restore-keys: |
${{ runner.os }}-pubspec-
- name: 'publish nyxx package to pub.dev'
- name: 'publish ${{ matrix.package }} package to pub.dev'
id: publish
uses: k-paxian/dart-package-publisher@master
working-directory: packages/${{ matrix.package }}
with:
skipTests: true
force: true
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
strategy:
matrix:
package: [lavalink, nyxx_lavalink]

steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand All @@ -27,16 +31,22 @@ jobs:
${{ runner.os }}-pubspec-
- name: Install dependencies
working-directory: packages/${{ matrix.package }}
run: dart pub get

- name: Analyze project source
working-directory: packages/${{ matrix.package }}
run: dart analyze

format:
name: Format
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
strategy:
matrix:
package: [lavalink, nyxx_lavalink]

steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand All @@ -53,9 +63,11 @@ jobs:
${{ runner.os }}-pubspec-
- name: Install dependencies
working-directory: packages/${{ matrix.package }}
run: dart pub get

- name: Format
working-directory: packages/${{ matrix.package }}
run: dart format --set-exit-if-changed -l 160 ./lib

tests:
Expand All @@ -64,6 +76,10 @@ jobs:
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
strategy:
matrix:
package: [lavalink, nyxx_lavalink]

steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand All @@ -80,7 +96,9 @@ jobs:
${{ runner.os }}-pubspec-
- name: Install dependencies
working-directory: packages/${{ matrix.package }}
run: dart pub get

- name: Unit tests
working-directory: packages/${{ matrix.package }}
run: dart run test test/unit/**
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ docs/
.project
.pub
**/build
**/packages
*.dart.js
*.part.js
*.js.deps
Expand Down Expand Up @@ -37,3 +36,4 @@ test-*.dart
coverage.json
lcov.info
pubspec.lock
application.yml.example
40 changes: 0 additions & 40 deletions Makefile

This file was deleted.

90 changes: 0 additions & 90 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions README.md
13 changes: 0 additions & 13 deletions analysis_options.yaml

This file was deleted.

63 changes: 0 additions & 63 deletions example/example.dart

This file was deleted.

22 changes: 0 additions & 22 deletions lib/nyxx_lavalink.dart

This file was deleted.

Loading

0 comments on commit 1b7137a

Please sign in to comment.