Skip to content

Commit

Permalink
wip(CI) start adding CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur VINCENT committed Dec 12, 2024
1 parent ee45c9e commit 782f797
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
name: ContinuousIntegration
name: CI/CD Workflow

on:
push:
branches:
- "main"
- "add_CI"
pull_request:
branches:
- "main"
- "add_CI"
types: [opened, synchronize, reopened, ready_for_review]

permissions:
contents: read

jobs:
test:

if: github.event_name == 'pull_request'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Python 3.8
Expand All @@ -29,10 +26,32 @@ jobs:
with:
python-version: 3.8.13
auto-activate-base: false

- name: Install and test
shell: bash -l {0}
run: |
conda create -n test_env python=3.8.13 libgdal=3.5.2 -c conda-forge -c defaults -y
conda activate test_env
echo "hello"
PIP_NO_BINARY=rasterio pip install .
pytest --compare
deploy:
needs: test
if: github.ref == 'refs/heads/add_CI' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8.13"
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.8.13
auto-activate-base: false
- name: Deploy to PyPI
shell: bash -l {0}
run: |
conda create -n deploy_env python=3.8.13 libgdal=3.5.2 build twine -c conda-forge -y
conda activate deploy_env
python -m build

0 comments on commit 782f797

Please sign in to comment.