-
Notifications
You must be signed in to change notification settings - Fork 6
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 #26 from max-pfeiffer/feature/poetry_and_python_ve…
…rsion_updates Feature/poetry and python version updates
- Loading branch information
Showing
23 changed files
with
639 additions
and
295 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 |
---|---|---|
|
@@ -8,4 +8,4 @@ updates: | |
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
interval: "monthly" |
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 |
---|---|---|
|
@@ -17,10 +17,16 @@ jobs: | |
with: | ||
version: 1.4.1 | ||
virtualenvs-in-project: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: | | ||
poetry config virtualenvs.in-project true | ||
poetry install --no-root | ||
poetry install --no-interaction --no-root | ||
- name: Run pylint and black | ||
run: | | ||
source .venv/bin/activate | ||
|
@@ -33,29 +39,33 @@ jobs: | |
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.4.1 | ||
virtualenvs-in-project: true | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: | | ||
poetry config virtualenvs.in-project true | ||
poetry install --no-root | ||
poetry install --no-interaction --no-root | ||
- name: Run all tests with pytest | ||
run: | | ||
source .venv/bin/activate | ||
export DOCKER_BUILDKIT=1 | ||
pytest | ||
pytest --cov=./ --cov-report=xml | ||
pytest --cov | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
@@ -69,6 +79,8 @@ jobs: | |
uses: actions/checkout@v3 | ||
- name: Get Git Commit Tag Name | ||
uses: olegtarasov/[email protected] | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
|
@@ -78,12 +90,16 @@ jobs: | |
with: | ||
version: 1.4.1 | ||
virtualenvs-in-project: true | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: | | ||
poetry config virtualenvs.in-project true | ||
poetry install --no-root | ||
poetry install --no-interaction --no-root | ||
- name: Publish Image to Docker Hub | ||
env: | ||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
|
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 |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
.venv | ||
.env | ||
.idea | ||
.vscode | ||
.pytest_cache | ||
__pycache__ |
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,19 +1,23 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-merge-conflict | ||
- id: detect-private-key | ||
- id: check-added-large-files | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
entry: pylint | ||
entry: .venv/bin/pylint | ||
language: system | ||
types: [python] | ||
args: | ||
- build | ||
- tests | ||
|
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
Oops, something went wrong.