Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Athena #86

Merged
merged 7 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
MYSQL_HOST=127.0.0.1
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=root
MYSQL_DB_NAME=test_cc
MYSQL_TABLE_NAME=ccindex
14 changes: 14 additions & 0 deletions .github/workflows/test_and_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ jobs:
test:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3


steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -24,8 +34,12 @@ jobs:
- name: Install dependencies
run: pip install -r requirements.test.txt # Replace with your dependencies installation command

- name: Set up env
run: cp .env.sample .env

- name: Run tests
run: python -m unittest discover -s tests -p "*_tests.py" # Replace with your test command

lint_and_types:
runs-on: ubuntu-latest

Expand Down
8 changes: 6 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@ repos:
- id: trailing-whitespace
- id: check-added-large-files

- repo: https://github.com/myint/autoflake
- repo: https://github.com/PyCQA/autoflake
rev: v1.4
hooks:
- id: autoflake
args: [--remove-all-unused-imports, --ignore-init-module-imports, --remove-unused-variables]
args:
- "--in-place"
- "--expand-star-imports"
- "--remove-duplicate-keys"
- "--remove-unused-variables"
language_version: python3.11

- repo: https://github.com/psf/black
Expand Down
Loading
Loading