Update python-app.yml #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pytest | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest # This will use the latest Ubuntu LTS available on GitHub Actions | |
container: | |
image: ubuntu:24.04 # This will use Ubuntu 24.04 inside a container | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up environment | |
run: | | |
apt-get update | |
apt-get install -y python3 python3-pip ffmpeg | |
python3 -m pip install --upgrade pip | |
- name: Check Ubuntu and FFmpeg versions | |
run: | | |
cat /etc/os-release | |
ffmpeg -version | |
- name: Install dependencies | |
run: | | |
pip3 install flake8 pytest | |
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
env: | |
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
run: | | |
pytest |