Skip to content

ci fix attempt1

ci fix attempt1 #92

Workflow file for this run

# taking as reference: https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml
name: Module Tests
on: [push, merge_group]
env:
PG_USER: test_user
PGPASSWORD: password
PG_DATABASE: test_database
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
services:
postgres:
image: postgres:14.1-alpine
ports:
- 5432:5432
env:
POSTGRES_USER: ${{ env.PG_USER }}
POSTGRES_PASSWORD: ${{ env.PGPASSWORD }}
POSTGRES_DB: ${{ env.PG_DATABASE }}
volumes:
- ./psql/docker_init_postgresql_test_db.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
clickhouse:
image: clickhouse/clickhouse-server
env:
CLICKHOUSE_DB: ${{ env.PG_DATABASE }}
CLICKHOUSE_USER: ${{ env.PG_USER }}
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
CLICKHOUSE_PASSWORD: ${{ env.PGPASSWORD }}
volumes:
- ./psql/docker_init_clickchouse_test_db.sql:/docker-entrypoint-initdb.d/docker_init_test_db.sql
ports:
- "8123:8123"
- "9000:9000"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with unittest
run: |
python -m unittest tests/test_module.py