Skip to content

Commit

Permalink
updating for pypi and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jogunjobi committed Aug 5, 2024
1 parent 3d8064e commit 017bbce
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Context Data ETL Vector Pipeline CI

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
pytest tests/
- name: Check code style
run: |
pip install flake8
flake8 .
- name: Type checking
run: |
pip install mypy
mypy etl_vector_pipeline
integration-test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run integration tests
run: |
pytest tests/integration
deploy:
runs-on: ubuntu-latest
needs: [build, integration-test]
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install build twine
- name: Build package
run: python -m build

- name: Publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ vector_etl/config/*
!vector_etl/config/
!examples/

# PyPI configuration
.pypirc

# Temporary test files
vector_etl/tempfile_downloads/
*_bkp.py
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"

0 comments on commit 017bbce

Please sign in to comment.