Skip to content

Update

Update #16

Workflow file for this run

name: pytest
on:
push:
branches:
- main
paths:
- "app.py/**"
- "Docker/**"
- ".github/workflows/**"
- "templates/**"
- 'static/**'
- 'tests/*.py'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: 3.12
cache: 'pip'
- name: Install dependencies
run: |
pip install pytest
pip install -r requirements.txt
- name: Run tests
run: |
pytest
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/todolist-depi-project:latest