This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove lock * Fixup file names; Add Makefile; Add ci support; Add PR and issue templates * Move unit tests to unit subdirectory * Migration to new import/export system * Implement interactions backend interface * Fix formatting * Fix formatting * Fix Makefile; Add few new tests * Rename tests files; Move tests to different files * Implement new unit tests * Components and command permissions tests; Fixed formatting and added nyxx_rest mock * Implement rest of component_builder.dart tests * Merge branch 'dev' into next * Implement model and backend tests * Fix test style * Fix skipped tests * Fix formatting * Merge dev into next * Actually invoke backends setup function on Interaction startup * Fixup registering commands; Use appId prop from client * Remove private test * Introduce new alternative way of handling autocompletes in code * Update documents * Use parameter application id * Actually allow not syncing command with api and registering them into framework * Fix bug where text in path was incorrectly replaced * Change final sync message, because current is misleading * Fix formatting * Remove sync function it is unneeded * Fixup pub badge * Do not export Interactions class; Add create method to interface * Migrate to dart-lang/setup-dart@v1 action * Release: 3.0.0-dev.0 * Linter config update; Fix lints * Fixup registering commands and bots connection * Release 3.0.0-dev.1 * Fix formatting * Fixes #10 * Bump version to 3.0.0-dev.2 * Update example in README * Refactor sync() method, closes #11 (#12) * Expose sync method in IInteractions * Partially revert 07974dc * Update CI actions * Add methods to batch delete guild and global commands (#13) * Update .gitignore * Add bulk delete methods to IInteractions, closes #9 * Improve readability Co-authored-by: Szymon Uglis <szymon@l7ssha.xyz> * Fix awaiting Streams and not Futures Co-authored-by: Szymon Uglis <szymon@l7ssha.xyz> * Run formatter Co-authored-by: Szymon Uglis <szymon@l7ssha.xyz> * Release 3.0.0 * Release 3.0.0 - fixup Co-authored-by: Abitofevrything <54505189+abitofevrything@users.noreply.github.com>
- Loading branch information
1 parent
75eada3
commit ec8fa0c
Showing
72 changed files
with
2,992 additions
and
2,309 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,29 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. Windows (with version), Linux (with kernel version)] | ||
- Dart version [e.g. 2.14.0] | ||
- Nyxx version [e.g. 3.0.0] | ||
- nyxx_interactions version [e.g. 3.0.0] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: enhancement | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,28 @@ | ||
# Description | ||
|
||
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. | ||
|
||
Use smart commits here to manipulate issues (eg. Fixes #issue) | ||
|
||
## Connected issues & potential 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 | ||
|
||
## Type of change | ||
|
||
Please delete options that are not relevant. | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
|
||
# Checklist: | ||
|
||
- [ ] Ran `dart analyze` or `make analyze` and fixed all issues | ||
- [ ] Ran `dart format --set-exit-if-changed -l 160 ./lib` or `make format` and fixed all issues | ||
- [ ] I have performed a self-review of my own code | ||
- [ ] 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 |
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,47 @@ | ||
name: deploy dev docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- next | ||
|
||
jobs: | ||
deploy-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup Dart Action | ||
uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
|
||
- 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/ssh-deploy@v2.1.5 | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }} | ||
ARGS: "-rltDzvO" | ||
SOURCE: "doc/api/" | ||
REMOTE_HOST: ${{ secrets.DEPLOY_REMOTE_HOST }} | ||
REMOTE_USER: ${{ secrets.DEPLOY_REMOTE_USER }} | ||
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx_interactions/${{ 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
nyxx_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- 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 | ||
with: | ||
skipTests: true | ||
force: true | ||
suppressBuildRunner: true | ||
credentialJson: ${{ secrets.CREDENTIAL_JSON }} | ||
|
||
- name: 'Commit release tag' | ||
if: steps.publish.outputs.success | ||
uses: hole19/git-tag-action@master | ||
env: | ||
TAG: ${{steps.publish.outputs.package}}-${{steps.publish.outputs.localVersion}} | ||
GITHUB_TOKEN: ${{ secrets.TAG_RELEASE_TOKEN }} |
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,110 @@ | ||
name: unit tests | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_TOKEN: ${{ secrets.TEST_TOKEN }} | ||
steps: | ||
- name: Setup Dart Action | ||
uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
|
||
- 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: Analyze project source | ||
run: dart analyze | ||
|
||
format: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_TOKEN: ${{ secrets.TEST_TOKEN }} | ||
steps: | ||
- name: Setup Dart Action | ||
uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
|
||
- 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: 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: Setup Dart Action | ||
uses: dart-lang/setup-dart@v1 | ||
|
||
- name: Install lcov | ||
run: sudo apt-get install -y lcov | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
|
||
- 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: Unit tests | ||
run: dart run test --coverage="coverage" test/unit/** | ||
|
||
- 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/ssh-deploy@v2.1.5 | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }} | ||
ARGS: '-rltDzvO --rsync-path="mkdir -p ${{ secrets.DEPLOY_REMOTE_TARGET }}/coverage/nyxx_interactions/${{ 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_interactions/${{ 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,7 @@ | ||
local/ | ||
.atom/ | ||
.vscode/ | ||
index.html | ||
docs/ | ||
.buildlog | ||
.packages | ||
.project | ||
.pub | ||
**/build | ||
**/packages | ||
*.dart.js | ||
*.part.js | ||
*.js.deps | ||
*.js.map | ||
*.info.json | ||
doc/api/ | ||
pubspec.lock | ||
*.iml | ||
**/coverage/** | ||
.idea | ||
*~ | ||
*# | ||
.#* | ||
.dart_tool/ | ||
/README.html | ||
/log.txt | ||
/nyxx.wiki/ | ||
/test/private.dart | ||
/publish_docs.sh | ||
/test/mirrors.dart | ||
/private | ||
private-*.dart | ||
test-*.dart | ||
[Rr]pc* | ||
**/doc/api/** | ||
old.* | ||
.dart_tool | ||
pubspec.lock | ||
.packages | ||
private_test.dart | ||
.vscode/ |
Oops, something went wrong.