Skip to content

✨ Further improved workflow #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
poetry install
- name: Lint with flake8
run: |
flake8 .
inv lint
- name: Test with pytest
run: |
pytest
inv test
- name: Publish to pypi
run: |
poetry version ${{ steps.get_version.outputs.version-without-v }}
Expand Down
55 changes: 37 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,49 @@ on:


jobs:
ci:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry install
- name: Lint
run: |
inv lint

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry install
- name: Lint
run: |
inv lint
- name: Test
run: |
inv test
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry install
- name: Test
run: |
inv test

code-cov:
runs-on: ubuntu-latest
Expand Down
14 changes: 13 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ mkdocs = "^1.2.2"
mkdocs-material = "^7.2.6"
PyYAML = "^5.4.1"
pydantic = "^1.8.2"
types-PyYAML = "^5.4.10"

[tool.coverage.paths]
source = ["src", "*/site-packages"]
Expand Down
6 changes: 4 additions & 2 deletions test/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
try:
from yaml import CLoader as YamlLoader
except ImportError:
from yaml import YamlLoader
from yaml import YamlLoader # type: ignore


class BaseTestConfig(BaseModel):
Expand Down Expand Up @@ -48,7 +48,9 @@ def get_singe_file_tests() -> List:
SINGLE_FILE_TESTS,
ids=[test.name for test in SINGLE_FILE_TESTS],
)
def test_single_files_from_yaml(test_config):
def test_single_files_from_yaml(
test_config: Union[BeforeAndAfterTest, UnchangedTest]
) -> None:
if isinstance(test_config, BeforeAndAfterTest):
assert convert_file(test_config.before) == test_config.after
elif isinstance(test_config, UnchangedTest):
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy