Skip to content

Fix python requirement #2586

Fix python requirement

Fix python requirement #2586

Workflow file for this run

name: tests
on:
push:
branches:
- main
pull_request: null
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
defaults:
run:
shell: bash -el {0}
jobs:
tests:
name: tests
runs-on: "macos-latest"
strategy:
matrix:
python_version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Conda env
uses: mamba-org/setup-micromamba@068f1ab4b37ed9b3d9f73da7db90a0cda0a48d29
with:
environment-file: environment.yml
micromamba-version: 1.5.12-0
cache-environment: true
create-args: >-
python=${{ matrix.python_version }}
coverage
coveralls
conda-souschef
- name: install conda-forge-tick and conda-recipe-manager
run: |
if [[ "${{ matrix.python_version }}" != "3.10" ]]; then
conda install "conda-recipe-manager>=0.4.1" conda-forge-tick --yes --quiet
fi
- name: install conda-smithy
run: |
if [[ "${{ matrix.python_version }}" != "3.10" ]]; then
conda uninstall --force --yes conda-smithy
fi
python -m pip install -v --no-build-isolation -e .
git config --global user.email "smithy@smithy.smithy"
git config --global user.name "smithy"
- name: test versions
run: |
pip uninstall conda-smithy --yes
[[ $(python -m setuptools_scm) != "0.0.0" ]] || exit 1
rm -rf dist/*
python -m build --sdist
pip install --no-build-isolation dist/*.tar.gz
pushd ..
python -c "import conda_smithy; assert conda_smithy.__version__ != '0.0.0'"
popd
pip uninstall conda-smithy --yes
rm -rf dist/*
python -m build --sdist . --outdir dist
pip install --no-build-isolation dist/*.tar.gz
pushd ..
python -c "import conda_smithy; assert conda_smithy.__version__ != '0.0.0'"
popd
pip uninstall conda-smithy --yes
python -m pip install -v --no-build-isolation -e .
- name: run tests without token
run: |
pytest tests
- name: run tests
run: |
pytest tests --cov conda_smithy --cov-report lcov --cov-report term-missing
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.lcov