Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI issues due to old conda version #465

Merged
merged 5 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions .github/workflows/check_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,13 @@ jobs:
steps:
- name: check out repository code
uses: actions/checkout@v3
- name: set up conda environment
uses: conda-incubator/setup-miniconda@v2
- name: set up mamba environment
uses: mamba-org/setup-micromamba@v1
with:
miniforge-version: latest
miniforge-variant: mambaforge
channel-priority: strict
channels: conda-forge
show-channel-urls: true
use-only-tar-bz2: true
auto-update-conda: true
auto-activate-base: false
activate-environment: notebook-env
- name: Install tobac dependencies
run: |
mamba install -c conda-forge --yes ffmpeg gcc jupyter pytables
mamba install -c conda-forge --yes --file example_requirements.txt
environment-file: environment-examples.yml
generate-run-shell: true
cache-environment: true
cache-downloads: true
- name: Install tobac
run: |
pip install .
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/codecov-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,20 @@ jobs:
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: "3.9"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Similar to MetPy install-conda action
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
uses: mamba-org/setup-micromamba@v1
with:
miniforge-version: latest
miniforge-variant: mambaforge
channel-priority: strict
channels: conda-forge
show-channel-urls: true
use-only-tar-bz2: true
environment-file: environment-ci.yml
generate-run-shell: true
cache-environment: true
cache-downloads: true

- name: Install dependencies and generate report
shell: bash -l {0}
- name: Generate report
shell: micromamba-shell {0}
run:
mamba install --quiet --yes --file requirements.txt coverage pytest-cov &&
python -m coverage run -m pytest --cov=./ --cov-report=xml
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
31 changes: 13 additions & 18 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,27 @@ permissions:
pull-requests: write

jobs:
build:
lint-workflow:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out Git repository
uses: actions/checkout@v3

- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
uses: actions/checkout@v4
- name: Set up mamba environment
uses: mamba-org/setup-micromamba@v1
with:
miniforge-version: latest
miniforge-variant: mambaforge
channel-priority: strict
channels: conda-forge
show-channel-urls: true
use-only-tar-bz2: true

- name: Install tobac and pylint
run: |
mamba install --yes pylint
environment-file: environment-ci.yml
generate-run-shell: true
cache-environment: true
cache-downloads: true
- name: Install tobac
run:
pip install .

- name: Store the PR branch
run: |
run:
echo "SHA=$(git rev-parse "$GITHUB_SHA")" >> $GITHUB_OUTPUT
id: git

Expand All @@ -42,7 +37,7 @@ jobs:
ref: ${{ github.base_ref }}

- name: Get pylint score of RC branch
run: |
run:
pylint tobac --disable=C --exit-zero
id: main_score

Expand All @@ -52,7 +47,7 @@ jobs:
ref: "${{ steps.git.outputs.SHA }}"

- name: Get pylint score of PR branch
run: |
run:
# use shell script to save only tail of output
OUTPUT_PART=$(pylint tobac --disable=C --exit-zero | tail -n 2)
# but post entire output in the action details
Expand Down
3 changes: 3 additions & 0 deletions environment-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ dependencies:
- pytest
- typing_extensions
- black
- coverage
- pytest-cov
- pylint
29 changes: 29 additions & 0 deletions environment-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: tobac-dev
channels:
- conda-forge
dependencies:
- numpy
- scipy
- scikit-image
- scikit-learn
- pandas
- matplotlib
- iris
- xarray<2024.10.0
- cartopy
- trackpy>=0.6.1
- pytest
- typing_extensions
- black
- jupyter
- notebook
- pytables
- s3fs
- arm_pyart
- seaborn
- h5netcdf
- typing_extensions
- rioxarray
- numba
- dask
- ffmpeg
Loading