-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (31 loc) · 1.2 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
name: Test
on: [push]
jobs:
lint:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
env:
# These are simulated secrets for test workflow only.
FAIRHUB_DATABASE_URL: postgresql://admin:root@localhost:5432/fairhub_local
FAIRHUB_SECRET: mXrkOHXXQoMAhCOTZOV93QlncmeTwEZFPxTP1TXGiOFabE0KmuZgHWvTOLgjbv3S
FAIRHUB_GROWTHBOOK_CLIENT_KEY: ${{ secrets.FAIRHUB_GROWTHBOOK_CLIENT_KEY }}
steps:
- uses: actions/checkout@v2
- name: Crate a database for tests with docker
run: docker run --name postgres -p 5432:5432 -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=root -e POSTGRES_DB=fairhub_local -d postgres:latest
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v8
- name: Install dependencies
run: poetry install
- uses: actions/cache@v2
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Run pytest (with capture)
run: poetry run pytest -s -W ignore::DeprecationWarning