Skip to content

Commit

Permalink
Freshen the CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Jan 5, 2024
1 parent b7e2894 commit fa2a5dc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Black
name: Format

on: [push, pull_request]

Expand All @@ -14,8 +14,8 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: psf/black@stable
with:
args: ". --check"
13 changes: 5 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Flake8
name: Lint

on: [push, pull_request]

Expand All @@ -14,13 +14,10 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/checkout@v4
- uses: actions/setup-python@v4

- name: Lint
run: |
pip install flake8
make lint
pip install ruff
ruff check .
24 changes: 9 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build/Test CI
name: Test

on: [push, pull_request]

Expand All @@ -20,17 +20,16 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: true

- name: Show conda installation info
run: |
Expand All @@ -39,21 +38,16 @@ jobs:
- name: Install requirements
run: |
conda install mamba
mamba install --file=requirements.txt
mamba list
mamba install --file=requirements.txt --file=requirements-testing.txt
- name: Build and install package
run: pip install -e .

- name: Install testing dependencies
run: mamba install --file=requirements-testing.txt

- name: Test
run: |
pytest --cov=heat --cov-report=xml:./coverage.xml -vvv
bmi-test heat:BmiHeat --config-file=./examples/heat.yaml --root-dir=./examples -vvv
- name: Coveralls
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
uses: AndreMiras/coveralls-python-action@v20201129
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: AndreMiras/coveralls-python-action@develop

0 comments on commit fa2a5dc

Please sign in to comment.