Skip to content

add required deps for testing full #270

add required deps for testing full

add required deps for testing full #270

Workflow file for this run

name: ci-branch-tests
# Bump 4
on: push
concurrency:
group: ada-quick-tests-${{ github.ref }}
cancel-in-progress: true
jobs:
bump:
name: Bump version
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
outputs:
version: ${{ steps.bump.outputs.version }}
conda_bump: ${{ steps.bump.outputs.condabump }}
pypi_bump: ${{ steps.bump.outputs.pypibump }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install bumpyproject
run: pip install git+https://github.com/Krande/bumpyproject.git
- name: Check if current pyproject version is safe for pushing to conda & pypi
id: bump
run: bumpy pyproject --check-current --ga-version-output
env:
CONDA_URL: "https://api.anaconda.org/package/krande/ada-py"
PYPI_URL: "https://pypi.org/pypi/ada-py/json"
- name: echo bump
run: |
echo ${{ steps.bump.outputs.version }}
echo CONDA_BUMP ${{ steps.bump.outputs.condabump }}
echo PYPI_BUMP ${{ steps.bump.outputs.pypibump }}
test-core:
name: Test ada-py-core
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1 # https://github.com/mamba-org/setup-micromamba
with:
cache-environment: true
environment-file: conda/environment.core.yml
create-args: >-
python=3.11
pytest
- name: Install latest adapy
run: |
pip install -e .
- name: Runs Tests
run: pytest ./tests --ignore=./tests/docker/ --ignore=./tests/full/
test-full:
name: Test ada-py-full
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1 # https://github.com/mamba-org/setup-micromamba
with:
cache-environment: true
environment-file: conda/environment.core.yml
create-args: >-
python=3.11
pytest
jupyterlab
pythreejs
pyparsing
websockets
pygfx
- name: Install latest adapy
run: |
pip install -e .
- name: Run Tests
run: pytest ./tests --ignore=./tests/docker/
# Only if triggered by a tag and passes tests, then publish to pypi and conda
pypi:
needs: [ test-core, test-full, bump ]
if: ${{ startsWith(github.ref, 'refs/tags/') && needs.bump.outputs.pypi_bump == 'TRUE' }}
name: Publish to PYPI
defaults:
run:
shell: bash -l {0}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install deps
run: pip install build
- name: Build and upload package for pypi
run: |
python -m build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
conda_upload:
needs: [ test-core, test-full, bump ]
if: ${{ startsWith(github.ref, 'refs/tags/') && needs.bump.outputs.conda_bump == 'TRUE' }}
name: Publish to CONDA
defaults:
run:
shell: bash -l {0}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build: [ { name: 'core' },{ name: 'full' } ]
steps:
- uses: actions/checkout@v3
- uses: mamba-org/setup-micromamba@v1 # https://github.com/mamba-org/setup-micromamba
with:
cache-environment: true
environment-file: conda/environment.build.yml
- name: Build & Upload to CONDA Dev
run: |
conda mambabuild -c conda-forge -c krande/label/dev . --variants "{'variant': '${{matrix.build.name}}'}" --user krande --token=${{ secrets.ANACONDA_TOKEN }} --label dev --no-copy-test-source-files --no-test --no-build-id
working-directory: conda
env:
VERSION: ${{ needs.bump.outputs.version }}