Skip to content

Commit

Permalink
Add linting and testing github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pattonw committed Mar 10, 2022
1 parent 8025372 commit e8b8e64
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Python Lint

on: [push, pull_request]

jobs:
lint:
name: Python Lint
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v1
- name: Setup checkout
uses: actions/checkout@master
- name: Lint with Black
run: |
pip install black
black -v --check dacapo tests
28 changes: 28 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test

on:
push:

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
pip install -r requirements.txt
- name: Test with pytest
run: |
pytest tests

0 comments on commit e8b8e64

Please sign in to comment.