Skip to content

Commit

Permalink
ci: setup basic github actions for project
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniszewski committed Aug 17, 2020
1 parent af3aab7 commit 5a0e4a5
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: lint
on:
push: {}
pull_request: {}
jobs:
lint:
runs-on: ubuntu-latest
name: Python 3.8 Lint
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U tox tox-gh-actions
- name: Lint
run: tox -e lint
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test
on:
push: {}
pull_request: {}
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py-version: ['3.6', '3.7', '3.8']
name: Python ${{ matrix.py-version }} Test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py-version }}
- name: Install dependencies
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U tox tox-gh-actions
- name: Run tests
run: tox tests/unit
15 changes: 14 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
[tox]
envlist = py3
envlist = py{36,37,38}
skip_missing_interpreters = True


[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38,lint


[testenv]
basepython =
py36: python3.6
py37: python3.7
py38: python3.8
deps =
pip-tools
commands =
Expand Down Expand Up @@ -33,6 +45,7 @@ commands =


[testenv:lint]
basepython=python3
deps =
isort>=5.0.0
flake8
Expand Down

0 comments on commit 5a0e4a5

Please sign in to comment.