-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (56 loc) · 1.7 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
name: tests
on:
push:
branches:
- main
pull_request: null
env:
PY_COLORS: "1"
jobs:
tests:
name: tests
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -leo pipefail {0}
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: dfmdet
- name: install code
run: |
pip install --no-deps --no-build-isolation -e .
- name: test versions
run: |
pip uninstall deep-metadetection --yes
[[ $(python setup.py --version) != "0.0.0" ]] || exit 1
rm -rf dist/*
python setup.py sdist
pip install -vv --no-deps --no-build-isolation dist/*.tar.gz
cd ..
python -c "import deep_metadetection; assert deep_metadetection.__version__ != '0.0.0'"
cd -
pip uninstall deep-metadetection --yes
rm -rf dist/*
python -m build --sdist . --outdir dist
pip install --no-deps --no-build-isolation dist/*.tar.gz
cd ..
python -c "import deep_metadetection; assert deep_metadetection.__version__ != '0.0.0'"
cd -
pip uninstall deep-metadetection --yes
python -m pip install -v --no-deps --no-build-isolation -e .
- name: run pytest
run: |
pytest \
-v \
--cov=deep_metadetection \
--cov=tests \
--cov-config=.coveragerc \
--cov-report=xml \
--cov-report=term-missing \
--durations 10 \
deep_metadetection
- name: upload codecov
uses: codecov/codecov-action@v3