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
15 changed files
with
999 additions
and
1,136 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 |
---|---|---|
@@ -1,73 +1,74 @@ | ||
name: Unittest, flake8 | ||
|
||
# Run action on pull requests | ||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.7" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install flake8 | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 inicheck | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.7" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install coverage coveralls PyYAML | ||
python3 -m pip install -r requirements.txt | ||
- name: Run coverage | ||
run: | | ||
make coverage | ||
coveralls --service=github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
unittest: | ||
needs: [flake8, coverage] | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r requirements.txt | ||
- name: Run unittests | ||
run: python3 -m unittest -v | ||
name: Unittest, flake8 | ||
|
||
# Run action on pull requests | ||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
jobs: | ||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.7" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install flake8 | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 inicheck | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.7" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install coverage coveralls PyYAML pytest | ||
python3 -m pip install -r requirements.txt | ||
- name: Run coverage | ||
run: | | ||
make coverage | ||
coveralls --service=github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
unittest: | ||
needs: [flake8, coverage] | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r requirements.txt | ||
python3 -m pip install pytest | ||
- name: Run unittests | ||
run: python3 -m pytest -v |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
-r requirements.txt | ||
autopep8 | ||
coverage==4.5.4 | ||
coveralls==1.11.1 | ||
isort==4.3.21 | ||
sphinx-rtd-theme==0.4.3 | ||
sphinx==1.8.5 | ||
sphinxcontrib-apidoc==0.3.0 | ||
-r requirements.txt | ||
autopep8 | ||
coverage==4.5.4 | ||
coveralls==1.11.1 | ||
isort==4.3.21 | ||
sphinx-rtd-theme==0.4.3 | ||
sphinx==1.8.5 | ||
sphinxcontrib-apidoc==0.3.0 | ||
pytest==6.0.2 |
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,51 @@ | ||
from os.path import join, dirname, abspath | ||
from pathlib import Path | ||
from inicheck.tools import get_user_config | ||
|
||
import pytest | ||
|
||
TEST_ROOT = dirname(abspath(__file__)) | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def test_config_dir(): | ||
return Path(TEST_ROOT).joinpath('test_configs') | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def full_config_ini(test_config_dir): | ||
return join(test_config_dir, "full_config.ini") | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def base_config_ini(test_config_dir): | ||
return join(test_config_dir, "base_cfg.ini") | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def old_smrf_config_ini(test_config_dir): | ||
return join(test_config_dir, "old_smrf_config.ini") | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def changelog_ini(test_config_dir): | ||
return join(test_config_dir, "changelog.ini") | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def core_ini(test_config_dir): | ||
return join(test_config_dir, "CoreConfig.ini") | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def recipes_ini(test_config_dir): | ||
return join(test_config_dir, "recipes.ini") | ||
|
||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def master_ini(core_ini, recipes_ini): | ||
return [core_ini, recipes_ini] | ||
|
||
@pytest.fixture(scope='session', autouse=True) | ||
def full_ucfg(full_config_ini, master_ini): | ||
return get_user_config(full_config_ini, master_files=master_ini) |
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.