Add a simple workflow for running build + test on pushes
Install dev dependencies, compile Python sources, and run pytest on every push to catch any potential issues that might've gone unnoticed during development
This commit is contained in:
parent
abb08efe74
commit
63059bb78f
1 changed files with 28 additions and 0 deletions
28
.github/workflows/build-and-test.yml
vendored
Normal file
28
.github/workflows/build-and-test.yml
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Compile the app and run tests
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
sanity-check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.11"
|
||||
cache: pip
|
||||
cache-dependency-path: requirements-dev.txt
|
||||
|
||||
- name: Install dependencies
|
||||
run: python -m pip install --upgrade pip && python -m pip install -r requirements-dev.txt
|
||||
|
||||
- name: Build app
|
||||
run: python -m compileall api core database services scripts web_server.py wsgi.py beatport_unified_scraper.py
|
||||
|
||||
- name: Run tests
|
||||
run: pytest
|
||||
Loading…
Reference in a new issue