Skip to content

Commit fd90674

Browse files
Add docker build on CI
1 parent 5d17d1b commit fd90674

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

.github/workflows/django.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
name: Django application
22
on: [push]
33
jobs:
4+
docker_build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- name: Build docker
9+
run: docker-compose build
10+
- name: Type check
11+
run: docker-compose run django mypy styleguide_example/
12+
- name: Run migrations
13+
run: docker-compose run django python manage.py migrate
14+
- name: Run tests
15+
run: docker-compose run django py.test
16+
417
build:
518
runs-on: ubuntu-latest
619
services:
@@ -32,6 +45,7 @@ jobs:
3245
run: python manage.py migrate
3346
- name: Run tests
3447
run: py.test
48+
3549
deploy_to_heroku:
3650
runs-on: ubuntu-latest
3751
needs: build

docker/local.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This docker file is used for local development via docker-compose
22
# Creating image based on official python3 image
3-
FROM python:3.10.2
3+
FROM python:3.10
44

55
# Fix python printing
66
ENV PYTHONUNBUFFERED 1

docker/production.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This docker file is used for production
22
# Creating image based on official python3 image
3-
FROM python:3.10.2
3+
FROM python:3.10
44

55
# Installing all python dependencies
66
ADD requirements/ requirements/

0 commit comments

Comments
 (0)