Skip to content

Implement Python sample app #15

Implement Python sample app

Implement Python sample app #15

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: ./test/setup.sh
- name: Test sample app
run: |
FAUNA_ENDPOINT=http://localhost:8443 FAUNA_SECRET=`cat .fauna_key` python3 ecommerce_app/app.py > app.log 2>&1 &
./test/validate.sh
cat app.log