-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Python version. Unified pipeline. Updated documentation.
- Loading branch information
1 parent
2cdfc00
commit 5648bf8
Showing
9 changed files
with
148 additions
and
193 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,62 @@ | ||
name: Pipeline | ||
|
||
on: push | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.11 | ||
- name: Install dependencies | ||
run: | | ||
poetry config virtualenvs.in-project true | ||
poetry install --no-root | ||
- name: Run all tests with pytest | ||
run: | | ||
source .venv/bin/activate | ||
export DOCKER_BUILDKIT=1 | ||
pytest | ||
pytest --cov=./ --cov-report=xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
publish-all-images: | ||
needs: run-tests | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
- name: Get Git Commit Tag Name | ||
uses: olegtarasov/[email protected] | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install Poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.11 | ||
- name: Install dependencies | ||
run: | | ||
poetry config virtualenvs.in-project true | ||
poetry install --no-root | ||
- name: Publish Image to Docker Hub | ||
env: | ||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
run: | | ||
source .venv/bin/activate | ||
python publish.py |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
from typing import List | ||
|
||
UVICORN_GUNICORN_POETRY_IMAGE_NAME = "pfeiffermax/uvicorn-gunicorn-poetry" | ||
FAST_API_MULTISTAGE_IMAGE_NAME = "fast-api-multistage-build" | ||
TARGET_ARCHITECTURES: List[str] = [ | ||
"python3.9.8-bullseye", | ||
"python3.9.8-slim-bullseye", | ||
TARGET_ARCHITECTURES: list[str] = [ | ||
"python3.9.12-bullseye", | ||
"python3.9.12-slim-bullseye", | ||
] | ||
BASE_IMAGES = { | ||
TARGET_ARCHITECTURES[0]: "python:3.9.8-bullseye", | ||
TARGET_ARCHITECTURES[1]: "python:3.9.8-slim-bullseye", | ||
TARGET_ARCHITECTURES[0]: "python:3.9.12-bullseye", | ||
TARGET_ARCHITECTURES[1]: "python:3.9.12-slim-bullseye", | ||
} |
Oops, something went wrong.