From a5475141cb416298c3e8c3c7b70bf693fe2ce16c Mon Sep 17 00:00:00 2001 From: Paolo Quadri Date: Fri, 4 Oct 2024 11:26:41 +0200 Subject: [PATCH] feat: add ci --- .github/workflows/ci.yml | 37 +++++++++++++++++++++ docker-compose.yml | 9 +++++ {target_s3/tests => tests}/__init__.py | 0 {target_s3/tests => tests}/sample_input.txt | 0 {target_s3/tests => tests}/test_base.py | 0 {target_s3/tests => tests}/test_core.py | 0 {target_s3/tests => tests}/test_parquet.py | 0 7 files changed, 46 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 docker-compose.yml rename {target_s3/tests => tests}/__init__.py (100%) rename {target_s3/tests => tests}/sample_input.txt (100%) rename {target_s3/tests => tests}/test_base.py (100%) rename {target_s3/tests => tests}/test_core.py (100%) rename {target_s3/tests => tests}/test_parquet.py (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e376cc1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + services: + minio: + image: docker.io/bitnami/minio + ports: + - 9000:9000 + env: + MINIO_ROOT_USER: minioadmin + MINIO_ROOT_PASSWORD: minioadmin + MINIO_DEFAULT_BUCKETS: test-bucket + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install Poetry + uses: abatilo/actions-poetry@v2 + with: + poetry-version: "1.8.2" + + - name: Install dependencies + run: poetry install + + - name: Run tests + run: poetry run pytest diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ca8b346 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +services: + minio: + image: docker.io/bitnami/minio + ports: + - "9000:9000" + environment: + MINIO_ROOT_USER: minioadmin + MINIO_ROOT_PASSWORD: minioadmin + MINIO_DEFAULT_BUCKETS: test-bucket diff --git a/target_s3/tests/__init__.py b/tests/__init__.py similarity index 100% rename from target_s3/tests/__init__.py rename to tests/__init__.py diff --git a/target_s3/tests/sample_input.txt b/tests/sample_input.txt similarity index 100% rename from target_s3/tests/sample_input.txt rename to tests/sample_input.txt diff --git a/target_s3/tests/test_base.py b/tests/test_base.py similarity index 100% rename from target_s3/tests/test_base.py rename to tests/test_base.py diff --git a/target_s3/tests/test_core.py b/tests/test_core.py similarity index 100% rename from target_s3/tests/test_core.py rename to tests/test_core.py diff --git a/target_s3/tests/test_parquet.py b/tests/test_parquet.py similarity index 100% rename from target_s3/tests/test_parquet.py rename to tests/test_parquet.py