-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use `pooch` instead of `wget` * use functiosn from `gartersnake` * update workflow * remove `dunamai` from documentation requirements * update build workflow * fix syntax error
- Loading branch information
1 parent
eac41c4
commit 728e35f
Showing
13 changed files
with
160 additions
and
388 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,44 +3,58 @@ name: tests | |
on: [ push ] | ||
|
||
jobs: | ||
tests: | ||
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
python-version: [ '3.6', '3.x' ] | ||
python-version: [ '3.x' ] | ||
steps: | ||
- name: Checkout repository | ||
- name: clone repository | ||
uses: actions/checkout@v2 | ||
- name: Install Python | ||
- name: install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Restore cached dependencies | ||
- name: load cached `~/.local` | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} | ||
restore-keys: ${{ runner.os }}-pip-${{ matrix.python-version }}- | ||
- name: Install netCDF4 library on Linux | ||
if: contains(matrix.os, 'ubuntu') | ||
run: sudo apt-get update -y && sudo apt-get install -y libnetcdf-dev libnetcdff-dev | ||
- name: Install dependencies | ||
run: pip install ".[testing,development]" | ||
- name: Lint with flake8 | ||
path: ~/.local | ||
key: ${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'setup.*') }} | ||
restore-keys: ${{ runner.os }}-python${{ matrix.python-version }}- | ||
- name: install dependencies | ||
run: pip install ".[development]" | ||
- name: lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Run tests with coverage | ||
run: pytest --numprocesses auto --cov ./ --cov-report xml:coverage.xml | ||
- name: Upload coverage to Codecov | ||
if: matrix.python-version == '3.x' | ||
uses: codecov/[email protected] | ||
test: | ||
needs: lint | ||
name: test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
python-version: [ '3.6', '3.x' ] | ||
steps: | ||
- name: clone repository | ||
uses: actions/checkout@v2 | ||
- name: install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: load cached `~/.local` | ||
uses: actions/cache@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: coverage.xml | ||
fail_ci_if_error: true | ||
path: ~/.local | ||
key: ${{ runner.os }}-python${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml', 'setup.*') }} | ||
restore-keys: ${{ runner.os }}-python${{ matrix.python-version }}- | ||
- name: install `pipwin` on Windows | ||
if: contains(matrix.os, 'windows') | ||
run: pip install pipwin | ||
- name: install dependencies | ||
run: pip install ".[testing]" | ||
- name: run tests | ||
run: pytest --numprocesses auto |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[build-system] | ||
requires = [ | ||
"dunamai", | ||
"setuptools", | ||
] | ||
build-backend = "setuptools.build_meta" |
Oops, something went wrong.