Skip to content

Commit

Permalink
GITHUB ACTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
E-963 committed Nov 18, 2024
1 parent 102772d commit 7ee4e68
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: PyTest

on: [ push ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'pip'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Running 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@v4
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/todolist-depi-project:latest

0 comments on commit 7ee4e68

Please sign in to comment.