36 lines
727 B
YAML
36 lines
727 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**"
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install openai pillow python-dotenv fastapi uvicorn pytest httpx
|
|
|
|
- name: Compile check
|
|
run: |
|
|
python -m py_compile main.py screenjob.py src/*.py tests/*.py
|
|
|
|
- name: Run tests
|
|
env:
|
|
OPENAI_API_KEY: test_key
|
|
SCREENJOB_TOKEN: test_token
|
|
run: |
|
|
pytest -q
|