-
Notifications
You must be signed in to change notification settings - Fork 17
67 lines (64 loc) · 1.85 KB
/
Copy pathdjango.yaml
File metadata and controls
67 lines (64 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Django CI
on: [push, pull_request]
env:
DJANGO_SECRET_KEY: pnunez1
NEWUSER_PW: pnunez2
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache poetry install
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-1.1.12-0
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v4
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
run: |
poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
- name: Run Tests
run: |
.venv/bin/python manage.py test
# deploy:
# runs-on: ubuntu-latest
# needs: build
# if: success() && github.ref == 'refs/heads/master'
# steps:
# - uses: actions/checkout@v4
# with:
# sparse-checkout: |
# scripts/deploy.sh
# sparse-checkout-cone-mode: false
# - name: Read deploy script contents
# uses: andstor/file-reader-action@v1.0.0
# id: deploy_script
# with:
# path: scripts/deploy.sh
# - name: Run deployment script if master branch updated
# uses: appleboy/ssh-action@v1.0.3
# with:
# host: ${{ secrets.DEPLOY_HOST }}
# username: ${{ secrets.DEPLOY_USERNAME }}
# key: ${{ secrets.DEPLOY_KEY }}
# port: ${{ secrets.DEPLOY_PORT }}
# script: ${{ steps.deploy_script.outputs.contents }}