Skip to content

Commit

Permalink
Merge pull request #35 from jvoss/jvoss/github_actions
Browse files Browse the repository at this point in the history
update github actions to latest versions
  • Loading branch information
jvoss authored Jan 13, 2023
2 parents 35a899b + 226b3e0 commit 3d45652
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 33 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
name: black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
path: ~/.cache/pip
Expand All @@ -33,11 +33,11 @@ jobs:
name: flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
path: ~/.cache/pip
Expand All @@ -55,11 +55,11 @@ jobs:
name: pydocstyle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
path: ~/.cache/pip
Expand All @@ -77,11 +77,11 @@ jobs:
name: sphinx
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
key: v0-${{ runner.os }}-pip-lint-${{ hashFiles('setup.py') }}
path: ~/.cache/pip
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
56 changes: 37 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,63 +11,81 @@ jobs:
needs: test-multi-python
runs-on: ubuntu-latest
steps:
- uses: coverallsapp/github-action@57daa114ba54fd8e1c8563e8027325c0bf2f5e80
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

test-multi-os:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v1

- uses: actions/cache@v3
with:
key: v0-${{ runner.os }}-pip-test-${{ hashFiles('setup.py') }}
path: ~/.cache/pip
restore-keys: |
v0-${{ runner.os }}-pip-test-
v0-${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Test with pytest
run: pytest
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]

test-multi-python:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v1

- uses: actions/cache@v3
with:
key: v0-${{ runner.os }}-pip-test-${{ hashFiles('setup.py') }}
path: ~/.cache/pip
restore-keys: |
v0-${{ runner.os }}-pip-test-
v0-${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
pip install coveralls
- name: Test with pytest
run: coverage run --source prsw --module pytest
- env:
COVERALLS_PARALLEL: true
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Submit to coveralls
run: coveralls

- name: Generate Coveralls LCOV report
run: coverage lcov

- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.python-version }}
path-to-lcov: ./coverage.lcov
parallel: true

- name: Check coverage
run: coverage report -m --fail-under=100
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]

0 comments on commit 3d45652

Please sign in to comment.