forked from django/djangoproject.com
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.19 KB
/
Copy pathdocker-test-build.yml
File metadata and controls
45 lines (36 loc) · 1.19 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
name: Docker test build
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-image:
runs-on: ubuntu-latest
strategy:
matrix:
req_file:
- prod.txt
- tests.txt
# steps taken (and trimmed) from docker-publish.yml
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.3
- if: matrix.req_file != 'tests.txt'
name: Test docker image build (${{ matrix.req_file }})
uses: docker/build-push-action@v7
with:
context: .
push: false
build-args: |
REQ_FILE=requirements/${{ matrix.req_file }}
- if: matrix.req_file == 'tests.txt'
name: Set up Docker Compose
uses: docker/setup-compose-action@v2
- if: matrix.req_file == 'tests.txt'
name: Run the tests via Docker
run: |
docker compose build
docker compose run --rm web make ci