Skip to content

Add ci

Add ci #26

Workflow file for this run

name: CI/CD Workflow
on:
pull_request:
branches:
- "main"
permissions:
contents: read
jobs:
test:
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: Install and test
shell: bash -l {0}
run: |
echo "test"
#conda create -n test_env python=3.8.13 libgdal=3.5.2 -c conda-forge -c defaults -y
#conda activate test_env
#PIP_NO_BINARY=rasterio pip install .
#pytest --compare
deploy:
needs: test
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: testpypi
url: https://test.pypi.org/p/georastertools
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: Build package
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
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
verbose: true
password: ${{ secrets.TEST_PYPI_PASSWORD }}
repository-url: https://test.pypi.org/legacy/