Refactor output #192
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
name: Python package | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout code | |
# uses: actions/checkout@v2 | |
uses: nschloe/action-cached-lfs-checkout@v1 | |
# Cache for LFS to limit usage of GitHub LFS monthly bandwidth | |
# See <https://github.com/actions/checkout/issues/165> | |
- name: Create LFS file list | |
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id | |
- name: Restore LFS cache | |
uses: actions/cache@v2 | |
id: lfs-cache | |
with: | |
path: .git/lfs | |
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1 | |
- name: Git LFS Pull | |
run: git lfs pull | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y libhdf5-dev libnetcdf-dev retry --option="APT::Acquire::Retries=3" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[full] | |
- name: Test with pytest | |
run: | | |
pip install pytest | |
pip install coverage | |
coverage run -m pytest | |
- name: Submit coverage | |
if: ${{ matrix.python-version == '3.8' }} | |
run: | | |
pip install codecov | |
codecov --token=${{ secrets.CODECOV_TOKEN }} |