Skip to content

fix: small fixes for flake8 and tests #4

fix: small fixes for flake8 and tests

fix: small fixes for flake8 and tests #4

Workflow file for this run

name: CI
on:
push:
branches:
- "*"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: pip install flake8
- run: flake8 app/
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r app/requirements.txt
- name: Run tests
run: pytest app/
build-and-push:
needs: [lint, test]
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/task-manager:${{ github.sha }}