feature/issue-33-add-pre-commit (#34) #66
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: Integration tests and flake8 | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
services: | |
minio: | |
# Not using official minio image minio/minio because it requires arguments (start /data) | |
# and github actions currently not supporting docker araguments | |
# bitnami/minio image has 10M+ pulls and is up to date so it's should be OK to use it | |
image: bitnami/minio:latest | |
ports: | |
- '9000:9000' | |
- '9001:9001' | |
env: | |
MINIO_ROOT_USER: administrator | |
MINIO_ROOT_PASSWORD: administrator | |
options: >- | |
--health-cmd "curl -I http://localhost:9000/minio/health/live" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 6 | |
--health-start-period 30s | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: pre-commit/action@v3.0.1 | |
with: | |
config: '.pre-commit-config.yaml' | |
verbose: true | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pylint poetry | |
poetry install --with dev | |
- name: integration tests | |
run: poetry run pytest tests | |
env: | |
MINIO_TEST_CONNECTION: localhost:9000 | |
MINIO_TEST_ACCESS_KEY: administrator | |
MINIO_TEST_SECRET_KEY: administrator |