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

Commit

Permalink
chore(ci): test if prod image builds
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Apr 15, 2024
1 parent fe56d6f commit e9a140b
Showing 1 changed file with 15 additions and 10 deletions.
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

0 comments on commit e9a140b

Please sign in to comment.