Add support for Cirun on self-hosted GHA runners #880
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: tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: null | |
jobs: | |
tests: | |
name: tests | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: 3.8 | |
channels: conda-forge,defaults | |
channel-priority: strict | |
show-channel-urls: true | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
- name: install code and deps | |
shell: bash -l {0} | |
run: | | |
mamba install --file requirements.txt \ | |
pre-commit coverage coveralls mock pytest \ | |
pytest-cov pip setuptools wheel ${CONDA_PKGS} \ | |
python-build \ | |
--yes | |
python -m pip install -v --no-build-isolation -e . | |
git config --global user.email "[email protected]" | |
git config --global user.name "smithy" | |
- name: test versions | |
shell: bash -l {0} | |
run: | | |
pip uninstall conda-smithy --yes | |
[[ $(python setup.py --version) != "0.0.0" ]] || exit 1 | |
rm -rf dist/* | |
python setup.py 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 | |
shell: bash -l {0} | |
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 |