Skip to content

Commit

Permalink
User github workflows instead of travis
Browse files Browse the repository at this point in the history
  • Loading branch information
spapanik committed Jul 5, 2021
1 parent fdef317 commit 2836fc7
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 23 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/python-package.yml
@@ -0,0 +1,39 @@
name: Test default branch

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

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

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: Gr1N/setup-poetry@v4
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
pip install yamk
yam
- name: Lint with flake8
run: |
yam lint
- name: Test with pytest
run: |
yam tests
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

20 changes: 13 additions & 7 deletions make.toml
@@ -1,3 +1,8 @@
["$globals"]
vars = [
{runner = "poetry run"},
]

[all]
alias = "install"

Expand All @@ -13,28 +18,29 @@ commands = [
phony = true
requires = ["install"]
commands = [
"isort .",
"black .",
"${runner} isort .",
"${runner} black .",
]

[lint]
phony = true
requires = ["install"]
commands = [
"flake8 .",
"isort --check .",
"black --check .",
"${runner} isort --check .",
"${runner} black --check .",
"${runner} flake8 .",
"${runner} mypy .",
]

[tests]
phony = true
requires = ["install"]
commands = [
"pytest ${pytest_args} ${pytest_path}",
"${runner} pytest ${pytest_args} ${pytest_path}",
]

["poetry.lock"]
requires = ["pyproject.toml"]
commands = [
"poetry lock && touch ${.target}",
"${runner} poetry lock && touch ${.target}",
]

0 comments on commit 2836fc7

Please sign in to comment.