forked from tiangolo/uvicorn-gunicorn-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #6 from rushilsrivastava/feat/github-actions-poetry
👷🏽 Convert build scripts to use poetry
- Loading branch information
Showing
3 changed files
with
53 additions
and
13 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 |
---|---|---|
|
@@ -33,13 +33,27 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: Install Dependencies | ||
run: python3.8 -m pip install six docker pytest | ||
python-version: "3.9" | ||
- name: Install and configure Poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install poetry dependencies | ||
run: poetry install --no-interaction --no-root | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
- name: Deploy Image | ||
run: bash scripts/build-push.sh | ||
run: | | ||
source .venv/bin/activate | ||
bash scripts/build-push.sh | ||
env: | ||
NAME: ${{ matrix.image.name }} | ||
PYTHON_VERSION: ${{ matrix.image.python_version }} | ||
|
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 |
---|---|---|
|
@@ -33,13 +33,27 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.8" | ||
- name: Install Dependencies | ||
run: python3.8 -m pip install six docker pytest | ||
python-version: "3.9" | ||
- name: Install and configure Poetry | ||
uses: snok/[email protected] | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
- name: Install poetry dependencies | ||
run: poetry install --no-interaction --no-root | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
- name: Test Image | ||
run: bash scripts/test.sh | ||
run: | | ||
source .venv/bin/activate | ||
bash scripts/test.sh | ||
env: | ||
NAME: ${{ matrix.image.name }} | ||
PYTHON_VERSION: ${{ matrix.image.python_version }} |
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