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

[WIP] space2stats-client #110

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
72 changes: 72 additions & 0 deletions .github/workflows/py-client-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Client CI/CD

on:
push:
branches: [ main ]
paths:
- 'space2stats_client/**'
pull_request:
branches: [ main ]
paths:
- 'space2stats_client/**'

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./space2stats_client

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
proj-bin libproj-dev gdal-bin libgdal-dev build-essential python3-dev \
libgeos-dev libopenblas-dev liblapack-dev libatlas-base-dev libhdf5-dev

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install dependencies
run: |
poetry run pip install --upgrade pip setuptools wheel
poetry run pip install cython numpy
poetry install --no-root

- name: Run tests
run: poetry run pytest

publish:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./space2stats_client

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Build and publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry build
poetry publish
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,7 @@ space2stats_api/space2stats_env
cdk.out
lambda_layer
.venv
.envrc
.envrc

# secrets
.secrets
Loading
Loading