-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.12 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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