From cbaeb2f21f4091a1b8cae9e4cccefddeab44559d Mon Sep 17 00:00:00 2001 From: Arthur Deierlein Date: Mon, 15 Apr 2024 09:43:26 +0200 Subject: [PATCH] chore(ci): test if prod image builds --- .github/workflows/test.yaml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 61b55a17..046bbc83 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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