generated from iamtatsuki05/python_template
-
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.
Merge pull request #3 from iamtatsuki05/develop
deploy test env update
- Loading branch information
Showing
9 changed files
with
375 additions
and
278 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,47 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
workflow_call: | ||
inputs: | ||
check-service-test: | ||
required: false | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.10.11] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install MeCab dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y mecab libmecab-dev mecab-ipadic-utf8 | ||
- name: Install Poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org | python3 - | ||
echo "PATH=$HOME/.local/bin:$PATH" >> $GITHUB_ENV | ||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
- name: Run tests | ||
run: | | ||
poetry run tox |
Large diffs are not rendered by default.
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
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 @@ | ||
VERSION = '0.1.0' |
Empty file.
Empty file.
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 @@ | ||
from unlock_pdf_password.env import VERSION | ||
|
||
|
||
def test_version(): | ||
assert VERSION == '0.1.0' |
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 @@ | ||
[tox] | ||
envlist = py310, lint | ||
|
||
[gh-actions] | ||
python = | ||
3.10: py310, lint | ||
|
||
[testenv] | ||
allowlist_externals = | ||
pytest | ||
skip_install = true | ||
commands = | ||
pytest tests/ | ||
|
||
[testenv:lint] | ||
allowlist_externals = | ||
pflake8 | ||
mypy | ||
black | ||
isort | ||
skip_install = true | ||
commands = | ||
# pflake8 --show-source --statistics src/ tests {posargs} | ||
# mypy . {posargs} | ||
black --check . {posargs} | ||
isort --check-only . {posargs} |