Skip to content

Commit

Permalink
Use parallel Coveralls reports in GitHub Actions (#213)
Browse files Browse the repository at this point in the history
* cache pip dependencies and run parallel coveralls builds.
  • Loading branch information
willgraf committed Nov 6, 2020
1 parent fa50cff commit 56b09a8
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/browser-tests.yaml
Expand Up @@ -6,7 +6,7 @@ name: browser
on: [push, pull_request]

jobs:
build:
tests:

runs-on: ubuntu-latest

Expand All @@ -22,15 +22,39 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r browser/requirements.txt
pip install -r browser/requirements-test.txt
- name: Test
- name: Run PyTest and Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
pytest browser --cov browser --pep8
coveralls
coveralls:
name: Finish Coveralls
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

0 comments on commit 56b09a8

Please sign in to comment.