Skip to content

Commit eba2073

Browse files
committed
Integrate poetry into CI and disable deployment workflow
1 parent 0fac281 commit eba2073

File tree

1 file changed

+41
-25
lines changed

1 file changed

+41
-25
lines changed

.github/workflows/django.yaml

+41-25
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,49 @@ jobs:
1919
uses: actions/setup-python@v4
2020
with:
2121
python-version: ${{ matrix.python-version }}
22+
- name: Cache poetry install
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.local
26+
key: poetry-1.1.12-0
27+
- name: Install poetry
28+
uses: snok/install-poetry@v1
29+
with:
30+
virtualenvs-create: true
31+
virtualenvs-in-project: true
32+
- name: Cache dependencies
33+
id: cache-deps
34+
uses: actions/cache@v2
35+
with:
36+
path: .venv
37+
key: pydeps-${{ hashFiles('**/poetry.lock') }}
2238
- name: Install Dependencies
2339
run: |
24-
pip install -r requirements.txt
40+
poetry install --no-interaction --no-root
41+
if: steps.cache-deps.outputs.cache-hit != 'true'
2542
- name: Run Tests
2643
run: |
2744
python manage.py test
28-
deploy:
29-
runs-on: ubuntu-latest
30-
needs: build
31-
if: success() && github.ref == 'refs/heads/master'
32-
steps:
33-
- uses: actions/checkout@v4
34-
with:
35-
sparse-checkout: |
36-
scripts/deploy.sh
37-
sparse-checkout-cone-mode: false
38-
- name: Read deploy script contents
39-
uses: andstor/[email protected]
40-
id: deploy_script
41-
with:
42-
path: scripts/deploy.sh
43-
- name: Run deployment script if master branch updated
44-
uses: appleboy/[email protected]
45-
with:
46-
host: ${{ secrets.DEPLOY_HOST }}
47-
username: ${{ secrets.DEPLOY_USERNAME }}
48-
key: ${{ secrets.DEPLOY_KEY }}
49-
port: ${{ secrets.DEPLOY_PORT }}
50-
script: ${{ steps.deploy_script.outputs.contents }}
51-
45+
# deploy:
46+
# runs-on: ubuntu-latest
47+
# needs: build
48+
# if: success() && github.ref == 'refs/heads/master'
49+
# steps:
50+
# - uses: actions/checkout@v4
51+
# with:
52+
# sparse-checkout: |
53+
# scripts/deploy.sh
54+
# sparse-checkout-cone-mode: false
55+
# - name: Read deploy script contents
56+
# uses: andstor/[email protected]
57+
# id: deploy_script
58+
# with:
59+
# path: scripts/deploy.sh
60+
# - name: Run deployment script if master branch updated
61+
# uses: appleboy/[email protected]
62+
# with:
63+
# host: ${{ secrets.DEPLOY_HOST }}
64+
# username: ${{ secrets.DEPLOY_USERNAME }}
65+
# key: ${{ secrets.DEPLOY_KEY }}
66+
# port: ${{ secrets.DEPLOY_PORT }}
67+
# script: ${{ steps.deploy_script.outputs.contents }}

0 commit comments

Comments
 (0)