Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

chore(ci): test if prod image builds #1031

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,29 @@ on:
pull_request:

jobs:
test:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: .venv
key: poetry-${{ hashFiles('poetry.lock')}}
restore-keys: |
peotry-
- name: Build the project
- name: Build the prod image
run: |
echo -e "ENV=dev\nUID=$UID" > .env
docker-compose up -d --build backend
docker build .

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint the code
run: |
echo -e "ENV=dev\nUID=$UID" > .env
docker-compose run --rm backend ruff format --check
docker-compose run --rm backend ruff check . --output-format=github
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set ENV vars
run: echo -e "ENV=dev\nUID=$UID" > .env
- name: Check for missing migrations
run: docker-compose run --rm backend python manage.py makemigrations --check --dry-run --no-input
- name: Run pytest
Expand Down