CI: fix incorrect syntax
Django CI/CD / checkout (push) Successful in 4s Details
Django CI/CD / test (push) Failing after 26s Details
Django CI/CD / build-and-push (push) Has been skipped Details

This commit is contained in:
Lukáš Kucharczyk 2023-11-18 10:46:29 +01:00
parent eaeb09598e
commit a275c1e1f3
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
1 changed files with 18 additions and 10 deletions

View File

@ -5,20 +5,28 @@ on:
paths-ignore: [ 'README.md' ] paths-ignore: [ 'README.md' ]
jobs: jobs:
test: checkout:
runs-on: python:3.12
steps:
- python -m pip install poetry
- poetry install
- poetry env info
- poetry run python manage.py migrate
- poetry run pytest
build-and-push:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
test:
needs: checkout
runs-on: ubuntu-latest
container: python:3.12
steps:
- name: Run test
run: |
python -m pip install poetry
poetry install
poetry env info
poetry run python manage.py migrate
poetry run pytest
build-and-push:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Build and push - name: Build and push