roll back python version #89
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pystog_ci_cd | |
env: | |
PYTHON_MAIN_VERSION: "3.10" | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.python-version }} | |
channels: conda-forge | |
- name: Conda install deps | |
shell: bash -l {0} | |
run: | | |
conda install --file requirements.txt --file requirements-dev.txt | |
conda install pip | |
pip install tox-gh-actions | |
- name: Lint with Tox | |
if: ${{ matrix.python-version == env.PYTHON_MAIN_VERSION }} | |
shell: bash -l {0} | |
run: | | |
tox -e lint | |
tox -e lint-security | |
- name: Test with Tox | |
shell: bash -l {0} | |
run: tox | |
- name: Coverage - create and upload report | |
shell: bash -l {0} | |
if: ${{ matrix.python-version == env.PYTHON_MAIN_VERSION }} | |
run: | | |
tox -e coverage | |
pip install coverage | |
bash <(curl -s https://codecov.io/bash) | |
- name: Build Python package and Upload to PyPi | |
shell: bash -l {0} | |
if: false # disabled for now | |
#if: ${{ startsWith( github.ref, 'refs/tags/v') && matrix.python-version == env.PYTHON_MAIN_VERSION }} | |
env: | |
PYPI_TOKEN_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
pip install wheel twine | |
python setup.py sdist bdist_wheel | |
twine upload --username "__token__" --password $PYPI_TOKEN_PASSWORD dist/* | |
- name: Build conda package and upload to Anaconda | |
shell: bash -l {0} | |
if: ${{ startsWith( github.ref, 'refs/tags/v') && matrix.python-version == env.PYTHON_MAIN_VERSION }} | |
env: | |
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
IS_RC: ${{ contains(github.ref, 'rc') }} | |
run: | | |
conda install -y anaconda-client conda-build conda-verify boa | |
cd conda.recipe | |
CONDA_LABEL="main" | |
if [ "${IS_RC}" = "true" ]; then CONDA_LABEL="rc"; fi | |
conda mambabuild --output-folder . . | |
anaconda upload --label $CONDA_LABEL noarch/*.tar.bz2 |