flowsms/.forgejo/workflows/build-python-app.yml
Carlos Rivas 5fa4e4c37f
Some checks failed
Build Python App / build (push) Failing after 22s
Reference proper branch name
2024-08-23 21:21:35 -07:00

54 lines
1.3 KiB
YAML

name: Build Python App
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install requirements
run: |
python3 -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with Ruff
run: |
pip install ruff
ruff format . --target-version=py311
continue-on-error: true
- name: Test with pytest
run: |
pip install coverage
coverage run -m pytest -v -s
- name: Generate Coverage Report
run: |
coverage report -m
- name: Login to Digital Hippo Labs Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DIPPOLABS_USERNAME }}
password: ${{ secrets.DIPPOLABS_TOKEN }}
registry: hub.digitalhippo.tech
- name: Build Docker Image
uses: docker/build-push-action@v6
with:
push: true
tags: hub.digitalhippo.tech/flowsms:latest