Skip to content

Commit 017bbce

Browse files
committedAug 5, 2024
updating for pypi and CI
1 parent 3d8064e commit 017bbce

File tree

3 files changed

+94
-0
lines changed

3 files changed

+94
-0
lines changed
 

‎.github/workflows/main.yaml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Context Data ETL Vector Pipeline CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.8, 3.9, "3.10"]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
29+
- name: Run tests
30+
run: |
31+
pytest tests/
32+
33+
- name: Check code style
34+
run: |
35+
pip install flake8
36+
flake8 .
37+
38+
- name: Type checking
39+
run: |
40+
pip install mypy
41+
mypy etl_vector_pipeline
42+
43+
integration-test:
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- uses: actions/checkout@v2
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v2
51+
with:
52+
python-version: 3.9
53+
54+
- name: Install dependencies
55+
run: |
56+
python -m pip install --upgrade pip
57+
pip install -r requirements.txt
58+
59+
- name: Run integration tests
60+
run: |
61+
pytest tests/integration
62+
63+
deploy:
64+
runs-on: ubuntu-latest
65+
needs: [build, integration-test]
66+
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
67+
steps:
68+
- uses: actions/checkout@v2
69+
70+
- name: Set up Python
71+
uses: actions/setup-python@v2
72+
with:
73+
python-version: 3.9
74+
75+
- name: Install dependencies
76+
run: |
77+
python -m pip install --upgrade pip
78+
pip install -r requirements.txt
79+
pip install build twine
80+
81+
- name: Build package
82+
run: python -m build
83+
84+
- name: Publish package
85+
env:
86+
TWINE_USERNAME: __token__
87+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
88+
run: twine upload dist/*

‎.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ vector_etl/config/*
166166
!vector_etl/config/
167167
!examples/
168168

169+
# PyPI configuration
170+
.pypirc
171+
169172
# Temporary test files
170173
vector_etl/tempfile_downloads/
171174
*_bkp.py

‎pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel"]
3+
build-backend = "setuptools.build_meta"

0 commit comments

Comments
 (0)
Failed to load comments.