-
Notifications
You must be signed in to change notification settings - Fork 14
68 lines (60 loc) · 1.79 KB
/
CI.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: CI
on: [push, pull_request]
jobs:
build:
# prevent actions from running on both the push to the PR and PR
# only run actions on PRs originating from a fork
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cfg:
- conda-env: base
python-version: 3.8
- conda-env: base
python-version: 3.9
- conda-env: base
python-version: "3.10"
- conda-env: base
python-version: "3.12"
env:
PYVER: ${{ matrix.cfg.python-version }}
CONDA_ENV: ${{ matrix.cfg.conda-env }}
steps:
- uses: actions/checkout@v2
- name: Create Environment
uses: conda-incubator/setup-miniconda@v2
with:
installer-url: https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
activate-environment: test
environment-file: devtools/conda-envs/${{ matrix.cfg.conda-env }}.yaml
python-version: ${{ matrix.cfg.python-version }}
auto-activate-base: false
- name: Setup Information
shell: bash -l {0}
run: |
uname -a
df -h
ulimit -a
echo $CONDA
echo $(which conda)
conda --version
- name: Install
shell: bash -l {0}
run: |
python -m pip install . --no-deps
- name: Environment Information
shell: bash -l {0}
run: |
conda list --show-channel-urls
- name: PyTest
shell: bash -l {0}
run: |
pytest -rws -v -m "not long" --cov=optking --color=yes --cov-report=xml optking/
- name: CodeCov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}