Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3 from nyxx-discord/next
Browse files Browse the repository at this point in the history
Release 3.0.0
  • Loading branch information
l7ssha authored Dec 19, 2021
2 parents 9795f9e + 353e924 commit 71af954
Show file tree
Hide file tree
Showing 35 changed files with 1,358 additions and 975 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
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_commander version [e.g. 3.0.0]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
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.
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
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
47 changes: 47 additions & 0 deletions .github/workflows/deploy_docs.yml
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/[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:
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_commander/${{ steps.extract_branch.outputs.branch }}/"
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
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 }}
108 changes: 108 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
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/[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: 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/[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: 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/[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: 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/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }}
ARGS: '-rltDzvO --rsync-path="mkdir -p ${{ secrets.DEPLOY_REMOTE_TARGET }}/coverage/nyxx_commander/${{ 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_commander/${{ steps.extract_branch.outputs.branch }}/"
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
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
.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/**
**/coverage/**
coverage.json
lcov.info
pubspec.lock
20 changes: 0 additions & 20 deletions .packages

This file was deleted.

23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
## 3.0.0

- Implemented new interface-based entity model.
> All concrete implementations of entities are now hidden behind interfaces which exports only behavior which is
> intended for end developer usage. For example: User is now not exported and its interface `IUser` is available for developers.
> This change shouldn't have impact for end developers.
- Fix CommandGroups bugs not passing parameters down the entity tree

Other changes are initial implementation of unit and integration tests to assure correct behavior of internal framework
processes. Also added `Makefile` with common commands that are run during development.

## 3.0.0-dev.0
__24.11.2021__

- Implemented new interface-based entity model.
> All concrete implementations of entities are now hidden behind interfaces which exports only behavior which is
> intended for end developer usage. For example: User is now not exported and its interface `IUser` is available for developers.
> This change shouldn't have impact for end developers.
- Fix CommandGroups bugs not passing parameters down the entity tree

Other changes are initial implementation of unit and integration tests to assure correct behavior of internal framework
processes. Also added `Makefile` with common commands that are run during development.

## 2.0.0
_03.10.2021_

Expand Down
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Contributing
Nyxx is free and open-source project, and all contributions are welcome and highly appreciated.
However, please conform to the following guidelines when possible.

## Branches

Repo contains few main protected branches:
- `main` - for current stable version. Used for releasing new versions
- `dev` - for changes for next minor or patch version release
- `next` - for changes for next major version release

## Development cycle

All changes should be discussed beforehand either in issue or pull request on github
or in a discussion in our Discord channel with library regulars or other contributors.

All issues marked with 'help-needed' badge are free to be picked up by any member of the community.

### Pull Requests

Pull requests should be descriptive about changes that are made.
If adding new functionality or modifying existing, documentation should be added/modified to reflect changes.

## Coding style

We attempt to conform [Effective Dart Coding Style](https://dart.dev/guides/language/effective-dart/style) where possible.
However, code style rules are not enforcement and code should be readable and easy to maintain.

**One exception to rules above is line limit - we use 160 character line limit instead of 80 chars.**
Loading

0 comments on commit 71af954

Please sign in to comment.