Skip to content

Commit 338027d

Browse files
committed
update and modernize unittests
1 parent 03d99bb commit 338027d

File tree

1 file changed

+25
-30
lines changed

1 file changed

+25
-30
lines changed

.github/workflows/unittests.yml

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,40 @@
1010

1111
jobs:
1212
unittests:
13-
name: conda (${{ matrix.os }}, ${{ matrix.environment-file }})
13+
name: ${{ matrix.os }}, ${{ matrix.environment-file }}
1414
runs-on: ${{ matrix.os }}
15-
# timeout-minutes: 25
15+
#timeout-minutes: 25
1616
strategy:
1717
matrix:
1818
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']
19-
environment-file: [ci/36.yaml, ci/37.yaml, ci/38.yaml]
19+
environment-file: [ci/36.yaml, ci/37.yaml, ci/38.yaml, ci/39.yaml]
2020
exclude:
2121
- environment-file: ci/36.yaml
2222
os: windows-latest
23-
defaults:
24-
run:
25-
shell: bash -l {0}
23+
2624
steps:
27-
- uses: actions/checkout@v2
28-
- uses: actions/cache@v2
29-
env:
30-
CACHE_NUMBER: 0
31-
with:
32-
path: ~/conda_pkgs_dir
33-
key: ${{ matrix.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles(matrix.environment-file) }}
34-
- uses: conda-incubator/setup-miniconda@v2
25+
- name: checkout repo
26+
uses: actions/checkout@v2
27+
28+
- name: setup micromamba
29+
uses: mamba-org/provision-with-micromamba@main
3530
with:
36-
miniconda-version: 'latest'
37-
mamba-version: '*'
38-
channels: conda-forge
39-
channel-priority: true
40-
auto-update-conda: false
41-
auto-activate-base: false
42-
environment-file: ${{ matrix.environment-file }}
43-
activate-environment: test
44-
use-only-tar-bz2: true
45-
- run: mamba info --all
46-
- run: mamba list
47-
- run: conda config --show-sources
48-
- run: conda config --show
49-
- run: python -c 'import libpysal; libpysal.examples.fetch_all()'
50-
- run: py.test -v libpysal --cov=libpysal --cov-report=xml
51-
- name: codecov (${{ matrix.os }}, ${{ matrix.environment-file }})
31+
environment-file: ${{ matrix.environment-file }}
32+
micromamba-version: 'latest'
33+
34+
- name: run tests - bash
35+
shell: bash -l {0}
36+
run: python -c 'import libpysal; libpysal.examples.fetch_all()'
37+
run: pytest -v libpysal --cov=libpysal --cov-report=xml
38+
if: matrix.os != 'windows-latest'
39+
40+
- name: run tests - powershell
41+
shell: powershell
42+
run: python -c 'import libpysal; libpysal.examples.fetch_all()'
43+
run: pytest -v libpysal --cov=libpysal --cov-report=xml
44+
if: matrix.os == 'windows-latest'
45+
46+
- name: ${{ matrix.os }}, ${{ matrix.environment-file }}
5247
uses: codecov/codecov-action@v1
5348
with:
5449
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)