forked from c-bata/go-prompt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #4
- Loading branch information
Showing
6 changed files
with
108 additions
and
62 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,15 @@ | ||
name: "Prepare test environment" | ||
description: "Prepares test environment" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '${{ env.GO_VERSION }}' | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '${{ env.PYTHON_VERSION }}' |
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,30 @@ | ||
name: "Run static code check" | ||
description: "Performs static code checks." | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install tests requirements | ||
run: | | ||
pip3 install -r test/requirements.txt | ||
shell: bash | ||
|
||
- name: Log versions | ||
run: | | ||
go version | ||
shell: bash | ||
|
||
- name: Go Linter | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
args: --config=golangci-lint.yml --out-${NO_FUTURE}format colored-line-number | ||
skip-cache: true | ||
|
||
- name: Python Linter | ||
run: python3 -m flake8 test | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'master' | ||
pull_request: | ||
pull_request_target: | ||
types: [labeled] | ||
|
||
env: | ||
GO_VERSION: 1.14 | ||
PYTHON_VERSION: '3.x' | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Prepare env | ||
uses: ./.github/actions/prepare-test-env | ||
|
||
- name: Static code check | ||
uses: ./.github/actions/static-code-check | ||
|
||
- name: Unit tests | ||
run: make test | ||
|
||
- name: Integration tests | ||
run: make 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
run: | ||
timeout: 3m | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- lll | ||
- govet | ||
- gofmt | ||
- stylecheck | ||
|
||
linters-settings: | ||
lll: | ||
line-length: 100 | ||
tab-width: 4 | ||
gofmt: | ||
simplify: false | ||
stylecheck: | ||
# Temporary disable "Poorly chosen identifier" check. | ||
checks: ["all", "-ST1003"] | ||
|
||
issues: | ||
exclude-rules: | ||
- linters: | ||
- lll | ||
source: "\t?// (see )?https://" |
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,5 @@ | ||
pytest==6.2.5 | ||
flake8==3.8.1 | ||
flake8-unused-arguments==0.0.6 | ||
flake8-isort==4.0.0 | ||
codespell==2.2.1 |