Skip to content

fix: more logging config fixes (#351) #67

fix: more logging config fixes (#351)

fix: more logging config fixes (#351) #67

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
db_url: ["http://localhost:8000", "postgres://postgres:postgres@localhost:5432/gene_normalizer_test"]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: 'postgres'
POSTGRES_DB: 'gene_normalizer_test'
POSTGRES_PASSWORD: 'postgres'
ports:
- 5432:5432
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DUMMY_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DUMMY_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-2
AWS_DEFAULT_OUTPUT: text
GENE_NORM_DB_URL: ${{ matrix.db_url }}
GENE_TEST: true
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install DynamoDB dependencies
if: ${{ env.GENE_NORM_DB_URL == 'http://localhost:8000' }}
run: python3 -m pip install ".[etl,test]"
- name: Install PG dependencies
if: ${{ env.GENE_NORM_DB_URL != 'http://localhost:8000' }}
run: python3 -m pip install ".[pg,etl,test]"
- name: Build local DynamoDB
if: ${{ env.GENE_NORM_DB_URL == 'http://localhost:8000' }}
run: |
chmod +x ./tests/unit/dynamodb_build.bash
./tests/unit/dynamodb_build.bash
- name: Run tests
run: python3 -m pytest tests/
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: python3 -m pip install ".[dev]"
- name: Check style
run: python3 -m ruff check . && python3 -m ruff format --check .
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ammaraskar/sphinx-action@master
with:
pre-build-command: 'python3 -m pip install --upgrade pip && python3 -m pip install .[docs]'
docs-folder: "docs/"