Skip to content

Commit

Permalink
Replace Travis with Github Actions
Browse files Browse the repository at this point in the history
Will build on 3.6 and 3.7, on Linux and Mac. Updates makefile to use
`python` instead of `python3` because Windows is weird. Windows builds
will come later when better support for spawned processes is added.
  • Loading branch information
amyreese committed Oct 17, 2019
1 parent c10f801 commit f894e32
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 26 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
@@ -0,0 +1,36 @@
name: Build
on:
push:
branches:
- master
tags:
- v*
pull_request:

jobs:
bowler:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7]
os: [macOS-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
make setup
pip install -U .
- name: Test
run: make test
- name: Lint
run: make lint
- name: Coverage
run: codecov --token ${{ secrets.CODECOV_TOKEN }} --branch ${{ github.ref }}
continue-on-error: true
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

16 changes: 8 additions & 8 deletions makefile
@@ -1,19 +1,19 @@
venv:
python3 -m venv .venv
python -m venv .venv
@echo 'run `source .venv/bin/activate` to use virtualenv'

setup:
python3 -m pip install -Ur requirements.txt
python3 -m pip install -Ur requirements-dev.txt
python -m pip install -Ur requirements.txt
python -m pip install -Ur requirements-dev.txt

dev: venv
source .venv/bin/activate && make setup
source .venv/bin/activate && python3 setup.py develop
source .venv/bin/activate && python setup.py develop
@echo 'run `source .venv/bin/activate` to develop bowler'

release: lint test clean
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
python setup.py sdist bdist_wheel
python -m twine upload dist/*

format:
isort --recursive -y bowler setup.py
Expand All @@ -31,8 +31,8 @@ lint:
mypy -m bowler

test:
python3 -m coverage run -m bowler.tests
python3 -m coverage report
python -m coverage run -m bowler.tests
python -m coverage report

clean:
rm -rf build dist README MANIFEST *.egg-info
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
@@ -1,4 +1,5 @@
black
codecov
coverage
isort
mypy-mypyc
Expand Down

0 comments on commit f894e32

Please sign in to comment.