Skip to content

Implement Python sample app #27

Implement Python sample app

Implement Python sample app #27

Workflow file for this run

name: Run Tests
on:
pull_request:
jobs:
validate:
strategy:
matrix:
# Run in all these versions of Python
# current and last three python versions
python-version:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
runs-on: ubuntu-latest
services:
fauna:
image: fauna/faunadb
ports:
- 8443:8443
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Run unit tests
run: python3 -m unittest discover
- name: Install fauna-shell
run:
npm install -g fauna-shell
- name: Setup Test Database
run: ./scripts/setup.sh
- name: Test sample app
run: |
cd ecommerce_app
FAUNA_ENDPOINT=http://localhost:8443 FAUNA_SECRET=`cat ../.fauna_key` python3 -m flask run > ../app.log 2>&1 &
cd ..
./scripts/validate.sh
cat app.log