Skip to content

Commit

Permalink
Merge pull request #24 from rafsaf/release_v4
Browse files Browse the repository at this point in the history
Release v4
  • Loading branch information
rafsaf authored Feb 5, 2023
2 parents 1cce9d3 + c766d2f commit 77ee850
Show file tree
Hide file tree
Showing 92 changed files with 2,000 additions and 4,189 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.11"

- name: Generate projects from templates using cookiecutter
# minimal_project folder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual_build_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.11"

- name: Generate projects from templates using cookiecutter
# minimal_project folder
Expand Down
44 changes: 7 additions & 37 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,30 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
python-version: "3.11"

- name: Generate projects from templates using cookiecutter
# fastapi_users_project folder
# minimal_project folder
# Below will create fresh template in path: minimal_project
- name: Generate project from template using cookiecutter
run: |
pip install cookiecutter
python tests/create_minimal_project.py
python tests/create_fastapi_users_project.py
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

### template minimal ###

- name: Load cached venv-1
id: cached-poetry-dependencies-template-1
# run tests from folder minimal_project
- name: Load cached venv
id: cached-poetry-dependencies-template
uses: actions/cache@v2
with:
path: minimal_project/.venv
key: venv-${{ runner.os }}-${{ hashFiles('minimal_project/poetry.lock') }}

- name: Install template minimal dependencies
if: steps.cached-poetry-dependencies-template-1.outputs.cache-hit != 'true'
if: steps.cached-poetry-dependencies-template.outputs.cache-hit != 'true'
run: |
cd minimal_project
poetry install --no-interaction --no-root
Expand All @@ -66,30 +63,3 @@ jobs:
cd minimal_project
poetry run flake8 app --count --exit-zero --statistics
poetry run coverage run -m pytest
### template fastapi users ###

- name: Load cached venv-2
id: cached-poetry-dependencies-template-2
uses: actions/cache@v2
with:
path: fastapi_users_project/.venv
key: venv-${{ runner.os }}-${{ hashFiles('fastapi_users_project/poetry.lock') }}

- name: Install template fastapi users dependencies
if: steps.cached-poetry-dependencies-template-1.outputs.cache-hit != 'true'
run: |
cd fastapi_users_project
poetry install --no-interaction --no-root
- name: Run template fastapi users flake8 and then tests
env:
TEST_DATABASE_HOSTNAME: localhost
TEST_DATABASE_PASSWORD: postgres
TEST_DATABASE_PORT: 5432
TEST_DATABASE_USER: postgres
TEST_DATABASE_DB: postgres
run: |
cd fastapi_users_project
poetry run flake8 app --count --exit-zero --statistics
poetry run coverage run -m pytest
Loading

0 comments on commit 77ee850

Please sign in to comment.