Skip to content

Commit 44f6c10

Browse files
committed
Replace Travis CI with GitHub Actions and pre-commit
1 parent f07f20a commit 44f6c10

File tree

5 files changed

+94
-34
lines changed

5 files changed

+94
-34
lines changed

.github/workflows/lint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions/setup-python@v2
12+
- uses: pre-commit/action@v2.0.3

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Test
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
test:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["pypy-3.8", "3.7", "3.8", "3.9", "3.10"]
15+
os: [ubuntu-latest]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
cache: pip
25+
cache-dependency-path: ".github/workflows/test.yml"
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install -U pip
30+
python -m pip install -U wheel
31+
python -m pip install -U coverage codecov
32+
33+
- name: Tests
34+
run: |
35+
coverage run --source=meow ./test_meow.py -v
36+
coverage run --append --source=no ./test_no.py -v
37+
coverage run --append --source=icebox ./test_icebox.py -v
38+
coverage xml
39+
40+
- name: Upload coverage
41+
uses: codecov/codecov-action@v2
42+
with:
43+
flags: ${{ matrix.codecov-flag }}
44+
name: ${{ matrix.os }} Python ${{ matrix.python-version }}

.pre-commit-config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
exclude: '^meow-meow.py$'
2+
repos:
3+
- repo: https://github.com/asottile/pyupgrade
4+
rev: v2.29.1
5+
hooks:
6+
- id: pyupgrade
7+
args: [--py37-plus]
8+
9+
- repo: https://github.com/psf/black
10+
rev: 21.11b1
11+
hooks:
12+
- id: black
13+
args: [--target-version=py37]
14+
15+
- repo: https://github.com/PyCQA/isort
16+
rev: 5.10.1
17+
hooks:
18+
- id: isort
19+
20+
- repo: https://github.com/PyCQA/flake8
21+
rev: 4.0.1
22+
hooks:
23+
- id: flake8
24+
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
25+
26+
- repo: https://github.com/pre-commit/pygrep-hooks
27+
rev: v1.9.0
28+
hooks:
29+
- id: python-check-blanket-noqa
30+
31+
- repo: https://github.com/pre-commit/pre-commit-hooks
32+
rev: v4.0.1
33+
hooks:
34+
- id: check-merge-conflict
35+
- id: check-yaml

.travis.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
50,000 Meows
22
============
33

4-
[![Build Status](https://travis-ci.org/hugovk/meow.py.svg?branch=master)](https://travis-ci.org/hugovk/meow.py)
5-
[![Coverage Status](https://coveralls.io/repos/github/hugovk/meow.py/badge.svg?branch=master)](https://coveralls.io/github/hugovk/meow.py?branch=master)
6-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/hugovk/meow.py/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/hugovk/meow.py/?branch=master)
7-
[![Code Health](https://landscape.io/github/hugovk/meow.py/master/landscape.svg)](https://landscape.io/github/hugovk/meow.py/master)
4+
[![Test](https://github.com/hugovk/meow.py/actions/workflows/test.yml/badge.svg)](https://github.com/hugovk/meow.py/actions/workflows/test.yml)
5+
[![Codecov](https://codecov.io/gh/hugovk/meow.py/branch/main/graph/badge.svg?token=7BAGzZptmW)](https://codecov.io/gh/hugovk/meow.py)
6+
[![Code style: Black](https://img.shields.io/badge/code%20style-Black-000000.svg)](https://github.com/psf/black)
87

98
An entry for [NaNoGenMo 2014](https://github.com/dariusk/NaNoGenMo-2014/):
109

0 commit comments

Comments
 (0)