mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c76ce567f8 | |||
| 2a470d3d4a | |||
| e1114779ed | |||
| 5467ced116 | |||
| 29f12ab4ae |
@@ -1,11 +1,54 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["main"]
|
branches: ["main"]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
hello:
|
compile:
|
||||||
|
# Byte-compile every first-party .py to catch syntax errors. No deps.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: echo "hello"
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
- name: py_compile first-party sources
|
||||||
|
run: |
|
||||||
|
git ls-files '*.py' | grep -vE '^(yt_dlp|spotify_dl)/' | xargs python -m py_compile
|
||||||
|
echo "All first-party sources compile."
|
||||||
|
|
||||||
|
unit:
|
||||||
|
# Pure-logic tests; tested modules guard heavy deps, so only pytest needed.
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
- name: Install test deps
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install pytest
|
||||||
|
- name: Run unit tests
|
||||||
|
run: pytest tests/unit -v
|
||||||
|
|
||||||
|
integration:
|
||||||
|
# Boot the Flask services and assert the X-Conjurer-Api-Key auth contract.
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
|
- name: Install service deps
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install pytest flask waitress requests
|
||||||
|
- name: Run integration tests
|
||||||
|
run: pytest tests/integration -v
|
||||||
|
|||||||
Reference in New Issue
Block a user