-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
1,017 additions
and
147 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 |
---|---|---|
|
@@ -3,7 +3,6 @@ name: Deploy dev docs to nyxx.l7ssha.xyz | |
on: | ||
push: | ||
branches: | ||
- dev | ||
- next | ||
|
||
jobs: | ||
|
@@ -39,9 +38,10 @@ jobs: | |
- name: Deploy nyxx dev docs | ||
uses: easingthemes/[email protected] | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }} | ||
ARGS: "-rltDzvO" | ||
SOURCE: "doc/api/" | ||
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx/${{ steps.extract_branch.outputs.branch }}/" | ||
with: | ||
REMOTE_HOST: ${{ secrets.DEPLOY_REMOTE_HOST }} | ||
REMOTE_USER: ${{ secrets.DEPLOY_REMOTE_USER }} | ||
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx/${{ steps.extract_branch.outputs.branch }}/" | ||
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }} |
This file was deleted.
Oops, something went wrong.
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,14 +1,15 @@ | ||
name: Run unit tests | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
branches: | ||
- main | ||
- next | ||
pull_request: | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze project source | ||
name: dart analyze | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Dart Action | ||
|
@@ -31,8 +32,32 @@ jobs: | |
- name: Analyze project source | ||
run: dart analyze | ||
|
||
fix: | ||
name: dart fix | ||
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: Analyze project source | ||
run: dart fix --dry-run | ||
|
||
format: | ||
name: Check project formatting | ||
name: dart format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup Dart Action | ||
|
@@ -55,8 +80,8 @@ jobs: | |
- name: Format | ||
run: dart format --set-exit-if-changed -l 160 ./lib | ||
|
||
tests: | ||
needs: [ format, analyze ] | ||
unit-tests: | ||
needs: [ format, analyze, fix ] | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
env: | ||
|
@@ -82,4 +107,33 @@ jobs: | |
run: dart pub get | ||
|
||
- name: Unit tests | ||
run: dart run test --coverage="coverage" test/unit/** | ||
run: dart run test test/unit/** | ||
|
||
integration-tests: | ||
name: Integration tests | ||
needs: [ format, analyze, fix ] | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_TOKEN: ${{ secrets.TEST_TOKEN }} | ||
TEST_TEXT_CHANNEL: ${{ secrets.TEST_TEXT_CHANNEL }} | ||
TEST_GUILD: ${{ secrets.TEST_GUILD }} | ||
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: Integration tests | ||
run: dart run test test/integration/** |
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,47 +1,26 @@ | ||
.PHONY: help | ||
help: ## display help | ||
@grep -F -h "##" $(MAKEFILE_LIST) | sed -e 's/\(\:.*\#\#\)/\:\ /' | grep -F -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | ||
help: | ||
@fgrep -h "##" $(MAKEFILE_LIST) | sed -e 's/\(\:.*\#\#\)/\:\ /' | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | ||
|
||
.PHONY: app-check | ||
app-check: format-check generate-coverage ## Run basic format checks and then generate code coverage | ||
|
||
.PHONY: format-check | ||
format-check: format analyze ## Check basic format | ||
|
||
.PHONY: generate-coverage | ||
generate-coverage: integration-tests unit-tests coverage-format coverage-gen-html ## Run all test and generate html code coverage | ||
|
||
.PHONY: generate-coverage-unit | ||
generate-coverage-unit: unit-tests coverage-format coverage-gen-html ## Run unit tests ad generate coverage | ||
|
||
.PHONY: integration-tests | ||
integration-tests: ## Run integration tests with coverage | ||
(timeout 20s dart run test --coverage="coverage" --timeout=none test/integration/** ; exit 0) | ||
format: ## Run dart format | ||
dart format -l120 . | ||
|
||
.PHONY: unit-tests | ||
unit-tests: ## Run unit tests with coverage | ||
(timeout 10s dart run test --coverage="coverage" --timeout=none test/unit/** ; exit 0) | ||
fix: ## Run dart fix | ||
dart fix --apply | ||
|
||
.PHONY: coverage-format | ||
coverage-format: ## Format dart coverage output to lcov | ||
dart run coverage:format_coverage --lcov --in=coverage --out=coverage/coverage.lcov --packages=.packages --report-on=lib | ||
analyze: ## Run dart analyze | ||
dart analyze | ||
|
||
.PHONY: coverage-gen-html | ||
coverage-gen-html: ## Generate html coverage from lcov data | ||
genhtml coverage/coverage.lcov -o coverage/coverage_gen | ||
unit-tests: ## Run unit tests | ||
dart run test test/unit/** | ||
|
||
.PHONY: format | ||
format: ## Run dart format | ||
dart format --set-exit-if-changed -l 160 ./lib | ||
integration-tests: ## Run integrations tests | ||
ifndef TEST_TOKEN $(error TEST_TOKEN is undefined) endif \ | ||
ifndef TEST_TEXT_CHANNEL $(error TEST_TEXT_CHANNEL is undefined) endif \ | ||
ifndef TEST_GUILD $(error TEST_GUILD is undefined) endif \ | ||
dart run test test/integration/** | ||
|
||
.PHONY: format-apply | ||
format-apply: ## Run dart format | ||
dart format --fix -l 160 ./lib | ||
fix-project: analyze fix format ## Fix whole project | ||
|
||
.PHONY: format-apply-tests | ||
format-apply-tests: ## Apply formatting to tests directory | ||
dart format --fix -l 160 ./test | ||
test-project: unit-tests integration-tests ## Run all tests | ||
|
||
.PHONY: analyze | ||
analyze: ## Run dart analyze | ||
dart analyze | ||
check-project: fix-project test-project ## Run all checks |
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,12 +1,4 @@ | ||
include: package:lints/recommended.yaml | ||
|
||
linter: | ||
rules: | ||
unrelated_type_equality_checks: false | ||
implementation_imports: false | ||
|
||
analyzer: | ||
exclude: [build/**] | ||
language: | ||
strict-casts: true | ||
strict-raw-types: true |
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
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
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
Oops, something went wrong.