2019-10-18 14:39:22 +00:00
|
|
|
---
|
|
|
|
name: build
|
|
|
|
|
2020-01-24 21:45:48 +00:00
|
|
|
on: [push, pull_request]
|
2019-10-18 14:39:22 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Set up Python 3.7
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
|
2019-11-05 19:27:20 +00:00
|
|
|
- name: Cache pre-commit hooks
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.cache/pre-commit
|
|
|
|
key: "${{ runner.os }}-pre-commit-\
|
|
|
|
${{ hashFiles('**/.pre-commit-config.yaml') }}"
|
|
|
|
|
|
|
|
- name: Cache pip test requirements
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.cache/pip
|
|
|
|
key: "${{ runner.os }}-pip-test-\
|
|
|
|
${{ hashFiles('**/requirements-test.txt') }}"
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pip-test-
|
|
|
|
${{ runner.os }}-pip-
|
|
|
|
|
2019-10-18 14:39:22 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install --upgrade -r requirements-test.txt
|
|
|
|
|
|
|
|
- name: Run pre-commit on all files
|
|
|
|
run: pre-commit run --all-files
|