Skip to content

🐍 Django project for the authentication service #7

🐍 Django project for the authentication service

🐍 Django project for the authentication service #7

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: user/app:latest
cache-from: type=gha
cache-to: type=gha,mode=max
test:
needs: docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Add your test execution steps here
# Example: Run unit tests
- name: Run Tests
run: |
echo "Running tests..."
# Example: docker run command to execute tests
# docker run user/app:latest your_test_command