Skip to content

Commit

Permalink
Merge pull request #49 from deardurham/github-actions
Browse files Browse the repository at this point in the history
Use GitHub actions
  • Loading branch information
copelco authored Mar 20, 2021
2 parents f5c6cb9 + 99854c0 commit 59ea4bf
Show file tree
Hide file tree
Showing 13 changed files with 95 additions and 663 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Lint and Test code

on:
pull_request:
schedule:
# run once a week on early monday mornings
- cron: '22 2 * * 1'

jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache pre-commit
uses: actions/cache@v2
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-precommit-
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt
- uses: pre-commit/[email protected]
- name: Run Tests
run: pytest
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ __pycache__
.DS_Store
ignore/
.pytest_cache
.direnv
.envrc
.coverage
htmlcov
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ repos:
rev: stable
hooks:
- id: black
language_version: python3
language_version: python3.8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: detect-private-key
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

20 changes: 0 additions & 20 deletions Pipfile

This file was deleted.

Loading

0 comments on commit 59ea4bf

Please sign in to comment.