generated from worldbank/template
-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (30 loc) · 836 Bytes
/
ci.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
name: Run Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
DB_HOST: localhost
DB_PORT: 5432
DB_NAME: mydatabase
DB_USER: myuser
DB_PASSWORD: mypassword
DB_TABLE_NAME: space2stats
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r space2stats_api/src/requirements.txt
pip install pre-commit pytest
- name: Set PYTHONPATH
run: echo "PYTHONPATH=$(pwd)/space2stats_api" >> $GITHUB_ENV
- name: Run pre-commit
run: pre-commit run --all-files
- name: Run tests
run: pytest space2stats_api/tests