Skip to content

Commit 10c55b0

Browse files
committed
Can we install dependencies in a different job?
1 parent 88689a6 commit 10c55b0

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

.github/workflows/django.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,23 @@ jobs:
1414
- name: Run tests
1515
run: docker compose run django py.test
1616

17+
install_dependencies:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: 3.12.4
24+
cache: "pip"
25+
cache-dependency-path: |
26+
requirements/local.txt
27+
requirements/base.txt
28+
- name: Install dependencies
29+
run: pip install -r requirements/local.txt
30+
1731
build:
1832
runs-on: ubuntu-latest
33+
needs: install_dependencies
1934
services:
2035
postgres:
2136
image: postgres:latest
@@ -29,15 +44,6 @@ jobs:
2944
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
3045
steps:
3146
- uses: actions/checkout@v4
32-
- uses: actions/setup-python@v5
33-
with:
34-
python-version: 3.12.4
35-
cache: "pip"
36-
cache-dependency-path: |
37-
requirements/local.txt
38-
requirements/base.txt
39-
- name: Install dependencies
40-
run: pip install -r requirements/local.txt
4147
- name: Run ruff
4248
run: ruff check .
4349
- name: Type check

0 commit comments

Comments
 (0)