Skip to content

Commit

Permalink
squash codecov workflow updates into main (#69)
Browse files Browse the repository at this point in the history
* update badge workflow

* remove extraneous lines

* update name

* merge into tests workflow

* use Codecov badge

* separate into two workflows

* update name

* make separate jobs instead of separate workflows
  • Loading branch information
zacharyburnett authored Apr 5, 2021
1 parent 60a4ce1 commit dab2f43
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ ij_python_wrap_long_lines = false
indent_size = 2
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_space_before_colon = true
ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = true
Empty file removed .github/badges/.keep
Empty file.
21 changes: 0 additions & 21 deletions .github/badges/badge.svg

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/badge.yml

This file was deleted.

38 changes: 35 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
fail-fast: true
matrix:
python-version: [ 3.6, 3.7, 3.8 ]

steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -26,7 +25,7 @@ jobs:
restore-keys: ${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install dependencies
run: |
apt-get update -y && apt-get install -y libnetcdf-dev libnetcdff-dev
apt update -y && apt install -y libnetcdf-dev libnetcdff-dev
pip install wheel
pip install -e .[development]
- name: Lint with flake8
Expand All @@ -35,7 +34,40 @@ jobs:
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: Test with coverage
- name: Run tests
run: python -m nose --nologcapture --verbose
coverage:
name: Upload coverage to Codecov
needs: [ tests ]
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: [ 3.8 ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Restore cached dependencies
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 dependencies
run: |
apt update -y && apt install -y libnetcdf-dev libnetcdff-dev
pip install wheel
pip install -e .[development]
- name: Run tests with coverage
run: coverage run --source adcircpy -m nose --nologcapture --verbose
- name: Generate coverage report
run: coverage report -m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
flags: python${{ matrix.python-version }}-${{ runner.os }}
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Python library for automating ADCIRC model runs.
[![tests](https://github.com/JaimeCalzadaNOAA/adcircpy/workflows/tests/badge.svg)](https://github.com/JaimeCalzadaNOAA/adcircpy/actions?query=workflow%3Atests)
[![build](https://github.com/JaimeCalzadaNOAA/adcircpy/workflows/build/badge.svg)](https://github.com/JaimeCalzadaNOAA/adcircpy/actions?query=workflow%3Abuild)
![coverage](.github/badges/badge.svg)
[![codecov](https://codecov.io/gh/JaimeCalzadaNOAA/adcircpy/branch/main/graph/badge.svg?token=BQWB1QKJ3Q)](https://codecov.io/gh/JaimeCalzadaNOAA/adcircpy)
[![version](https://img.shields.io/pypi/v/adcircpy)](https://pypi.org/project/adcircpy)
[![license](https://img.shields.io/github/license/JaimeCalzadaNOAA/adcircpy)](https://opensource.org/licenses/gpl-license)

Expand Down

0 comments on commit dab2f43

Please sign in to comment.