Fix: Add build script #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: Django Test (CI/CD) | |
on: | |
push: | |
branches: | |
- main # Adjust branch name as needed | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python with 3.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run tests | |
env: | |
MONGO_URL: ${{ secrets.MONGO_URL }} | |
DB_COLLECTION_NAME: ${{ secrets.DB_COLLECTION_NAME }} | |
run: | | |
cd food_truck_finder | |
pytest | |