Skip to content

Commit

Permalink
Update and simplify CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Feb 19, 2022
1 parent ff51caf commit 52e4e31
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Lint

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-20.04
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
- uses: pre-commit/action@v2.0.3
28 changes: 12 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Test

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

env:
FORCE_COLOR: 1

jobs:
build:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -20,19 +20,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ matrix.python-version }}-
cache: pip

- name: Install dependencies
run: |
Expand All @@ -49,6 +37,14 @@ jobs:
coverage report
- name: Upload coverage
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2
with:
name: Python ${{ matrix.python-version }}

success:
needs: test
runs-on: ubuntu-latest
name: Test successful
steps:
- name: Success
run: echo Test Successful

0 comments on commit 52e4e31

Please sign in to comment.