Skip to content

Commit

Permalink
Update v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Athroniaeth committed Jan 22, 2024
1 parent f29abbb commit 32b5cad
Show file tree
Hide file tree
Showing 76 changed files with 1,543 additions and 621 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: poetry install

- name: Run Ruff (Linting)
run: poetry run ruff check ./src ./tests
run: poetry run ruff check

bandit-security:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -113,3 +113,14 @@ jobs:

- name: Run Coverage (Report)
run: poetry run coverage report -m --fail-under=50

- name: Run Coverage (HTML Report)
run: poetry run coverage html

- name: Run Coverage (Codecov Report)
run: poetry run coverage xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: poetry run ruff format ./src ./tests

- name: Run Ruff (Linting)
run: poetry run ruff check --exit-zero ./src ./tests
run: poetry run ruff check --exit-zero

- name: Run Bandit (Security Analysis)
run: poetry run bandit -c pyproject.toml -r src
Expand All @@ -56,4 +56,4 @@ jobs:
run: poetry run coverage run --source=src -m pytest

- name: Run Coverage (Report)
run: poetry run coverage report -m --fail-under=50
run: poetry run coverage report -m --fail-under=90
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: poetry run ruff format ./src ./tests

- name: Run Ruff (Linting)
run: poetry run ruff check ./src ./tests
run: poetry run ruff check

- name: Run Bandit (Security Analysis)
run: poetry run bandit -c pyproject.toml -r src
Expand All @@ -48,7 +48,7 @@ jobs:
run: poetry run coverage run --source=src -m pytest

- name: Run Coverage (Report)
run: poetry run coverage report -m --fail-under=50
run: poetry run coverage report -m --fail-under=90

publish:
needs: build-and-test
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
.pytest_lock/
cover/

# Translations
Expand Down Expand Up @@ -160,4 +159,8 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
.idea/workspace.xml
.idea/*
.idea/**/*
.idea/workspace.xml
.idea/dataSources.local.xml
.idea/workspace.*
4 changes: 2 additions & 2 deletions .idea/pytest-lock.iml

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

145 changes: 116 additions & 29 deletions .idea/workspace.xml

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

21 changes: 21 additions & 0 deletions .run/pytest.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="pytest" type="tests" factoryName="py.test" nameIsGenerated="true">
<module name="pytest-lock" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="C:\Users\pierr\AppData\Local\pypoetry\Cache\virtualenvs\poetry-lock-1XD7cA0J-py3.12\Scripts\python.exe" />
<option name="SDK_NAME" value="Poetry (pytest-lock)" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="_new_keywords" value="&quot;&quot;" />
<option name="_new_parameters" value="&quot;&quot;" />
<option name="_new_additionalArguments" value="&quot;&quot;" />
<option name="_new_target" value="&quot;&quot;" />
<option name="_new_targetType" value="&quot;CUSTOM&quot;" />
<method v="2" />
</configuration>
</component>
22 changes: 22 additions & 0 deletions .run/tox.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="tox" type="Tox" factoryName="Tox">
<module name="pytest-lock" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="C:\Users\pierr\AppData\Local\pypoetry\Cache\virtualenvs\poetry-lock-1XD7cA0J-py3.12\Scripts\python.exe" />
<option name="SDK_NAME" value="Poetry (pytest-lock)" />
<option name="WORKING_DIRECTORY" value="" />
<option name="IS_MODULE_SDK" value="false" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<arguments>
<array />
</arguments>
<runOnlyEnvs>
<array />
</runOnlyEnvs>
<method v="2" />
</configuration>
</component>
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog
## v0.1.0
- Add `lock` fixture
- Add `lock.lock` method
- Add cli argument `--lock` to pytest
- Add functionality, if a test have `lock` fixture, then compare the result of the test with the result in the cache file
- Add functionality, if a test have `lock` and `--lock` cli argument, then lock the result of the test to a cache file
- Add functionality, if a test have `lock` and `--simulate` cli argument, then simulate the result of the test, not write to the cache file
- Add functionality, if a test have `lock` and `--only-skip` cli argument, then don't update lock if the result was not locked
- Add functionality, if a test have `lock` and `--lock-date` cli argument, then lock the result of the test to a cache file with the date of the lock, if date was expired, then the test is failed
Loading

0 comments on commit 32b5cad

Please sign in to comment.