-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from ESGF/refresh-ci
Refresh CI: add conda/mamba environment file and modern env creation, fix tests, and add modern Github Action workflow file
- Loading branch information
Showing
9 changed files
with
79 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,49 @@ | ||
name: build ⚙️ | ||
|
||
on: [ push, pull_request ] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '30 5 * * *' | ||
|
||
# Required shell entrypoint to have properly configured bash shell | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
fail-fast: false | ||
name: Python ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install packages | ||
run: | | ||
sudo apt-get -y install pandoc | ||
if: matrix.python-version == 3.7 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install requirements 📦 | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e ".[dev]" | ||
- name: Test with pytest ⚙️ | ||
run: make test-all | ||
- name: Lint with flake8 ⚙️ | ||
run: make lint | ||
if: matrix.python-version == 3.6 | ||
- name: Test notebooks ⚙️ | ||
run: make test-nb | ||
if: matrix.python-version == 3.7 | ||
- name: Build docs 🏗️ | ||
run: make docs | ||
if: matrix.python-version == 3.7 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: esgf-pyclient | ||
environment-file: environment.yml | ||
python-version: ${{ matrix.python-version }} | ||
miniforge-version: "latest" | ||
miniforge-variant: Mambaforge | ||
use-mamba: true | ||
- run: conda --version | ||
- run: python -V | ||
- name: Install 📦 | ||
run: pip install -e .[develop] | ||
- name: Lint with flake8 ⚙️ | ||
run: flake8 | ||
- name: Run tests | ||
run: pytest | ||
- name: Test notebooks ⚙️ | ||
run: make test-nb | ||
- name: Build docs 🏗️ | ||
run: make docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
# conda env create -f environment.yml | ||
--- | ||
name: esgf-pyclient | ||
channels: | ||
- conda-forge | ||
- nodefaults | ||
|
||
dependencies: | ||
# installation | ||
- pip | ||
- python>=3.7 | ||
- python>=3.8 | ||
- requests | ||
- requests_cache | ||
- jinja2 | ||
- defusedxml | ||
- webob | ||
- myproxyclient | ||
# testing | ||
- flake8 | ||
- pytest | ||
# documentation | ||
- sphinx | ||
- nbsphinx | ||
- pandoc | ||
# ipython notebook | ||
- ipykernel | ||
- nbconvert | ||
- nbval |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters