feat: year 2 dashboard updates #383
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |