Skip to content

Commit 011b7e2

Browse files
authored
Merge pull request #32 from glemieux/unittest-fixes
Unit test fixes
2 parents 5b35732 + 41202de commit 011b7e2

File tree

3 files changed

+24
-48
lines changed

3 files changed

+24
-48
lines changed

.github/workflows/lint.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@ jobs:
1515
python-version: ["3.12"]
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
1922
- name: Set up Python ${{ matrix.python-version }}
2023
uses: actions/setup-python@v5
2124
with:
2225
python-version: ${{ matrix.python-version }}
26+
2327
- name: Install dependencies
2428
run: |
2529
# install linter dependencies (listed as optional in pyproject.toml)
2630
python -m pip install --upgrade pip
2731
pip install -e .["lint"]
32+
2833
- name: Lint with flake8
2934
run: |
3035
# stop the build if there are Python syntax errors or undefined names
Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,54 @@
1-
name: miniconda setup
1+
name: Unit testing with Conda
22

33
on:
44
workflow_dispatch:
5+
schedule:
6+
- cron: '30 23 * * SUN'
7+
pull_request:
8+
types: [opened, reopened, synchronize]
59

610
jobs:
711
setup-conda:
812
runs-on: "ubuntu-latest"
913
strategy:
1014
matrix:
11-
python-version: ["3.8"]
15+
python-version: ${{ github.event_name == 'schedule' && fromJson('["3.8", "3.9", "3.10", "3.11", "3.12"]') || fromJson('["3.12"]') }}
1216
defaults:
1317
run:
1418
shell: bash -el {0}
1519
steps:
16-
- uses: actions/checkout@v4
17-
- uses: conda-incubator/setup-miniconda@v3
20+
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Miniconda
25+
uses: conda-incubator/setup-miniconda@v3
1826
with:
1927
activate-environment: test
2028
python-version: ${{ matrix.python-version }}
2129
channels: conda-forge
2230
channel-priority: flexible
2331
show-channel-urls: true
32+
2433
- name: Display conda info
2534
run: |
2635
conda info
2736
conda list
2837
conda config --show-sources
2938
conda config --show
39+
3040
- name: Install pyproject2conda
3141
run: |
3242
conda install -c conda-forge pyproject2conda -y
43+
3344
- name: Convert pyproject to environment.yml
3445
run: |
3546
pyproject2conda yaml -e test --python-include python=${{ matrix.python-version }} > environment.yml
47+
3648
- name: Install dependencies from environment.yml
3749
run: |
3850
conda env update --file environment.yml --name test
3951
rm environment.yml
40-
- name: Run tests
52+
53+
- name: Run unit tests
4154
run: pytest

.github/workflows/unit.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)