forked from conda-forge/conda-smithy
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 2.06 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: tests
on:
push:
branches:
- main
pull_request: null
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -el {0}
jobs:
tests:
name: tests
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Conda env
uses: mamba-org/setup-micromamba@f8b8a1e23a26f60a44c853292711bacfd3eac822
with:
environment-file: environment.yml
cache-environment: true
create-args: >-
python=3.8
coverage
coveralls
- name: install conda-smithy
run: |
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
run: |
pytest tests --cov conda_smithy --cov-report lcov --cov-report term-missing
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: run type check
run: |
mypy conda_smithy tests
- name: coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage.lcov