version 0.1 (#3) #6
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: Python FastAPI CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code from the repository | |
- name: Check out code | |
uses: actions/checkout@v3 | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.7' # Or whichever version your project requires | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
# Run tests | |
- name: Run tests | |
run: | | |
source venv/bin/activate | |
PYTHONPATH=./ pytest |