Skip to content

Commit f8c582a

Browse files
authored
Merge pull request #188 from hugovk/rm-travis
2 parents fe058f6 + 1f3b4ba commit f8c582a

File tree

5 files changed

+64
-68
lines changed

5 files changed

+64
-68
lines changed

.github/workflows/lint.yml

+2-30
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,11 @@ name: Lint
22

33
on: [push, pull_request]
44

5-
env:
6-
FORCE_COLOR: 1
7-
85
jobs:
96
build:
107
runs-on: ubuntu-20.04
118

129
steps:
1310
- uses: actions/checkout@v2
14-
15-
- name: Cache
16-
uses: actions/cache@v2
17-
with:
18-
path: |
19-
~/.cache/pip
20-
~/.cache/pre-commit
21-
key:
22-
lint-v1-${{ hashFiles('**/setup.py') }}-${{
23-
hashFiles('**/.pre-commit-config.yaml') }}
24-
restore-keys: |
25-
lint-v1-
26-
27-
- name: Set up Python
28-
uses: actions/setup-python@v1
29-
with:
30-
python-version: 3.8
31-
32-
- name: Install dependencies
33-
run: |
34-
python -m pip install -U pip
35-
python -m pip install -U pre-commit
36-
37-
- name: Lint
38-
run: pre-commit run --all-files --show-diff-on-failure
39-
env:
40-
PRE_COMMIT_COLOR: always
11+
- uses: actions/setup-python@v2
12+
- uses: pre-commit/action@v2.0.0

.github/workflows/test.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
FORCE_COLOR: 1
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: ["3.6", "3.7", "3.8", "3.9"]
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Get pip cache dir
25+
id: pip-cache
26+
run: |
27+
echo "::set-output name=dir::$(pip cache dir)"
28+
29+
- name: Cache
30+
uses: actions/cache@v2
31+
with:
32+
path: ${{ steps.pip-cache.outputs.dir }}
33+
key: ${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
34+
restore-keys: |
35+
${{ matrix.python-version }}-
36+
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install -U pip
40+
python -m pip install -U wheel
41+
python -m pip install -r requirements.txt
42+
python -m pip install coverage
43+
44+
- name: Tox tests
45+
shell: bash
46+
run: |
47+
coverage run --append --source scripts test/test_gpo_member_photos.py
48+
coverage run --append --source scripts scripts/missing.py
49+
coverage report
50+
51+
- name: Upload coverage
52+
uses: codecov/codecov-action@v1
53+
with:
54+
name: Python ${{ matrix.python-version }}

.pre-commit-config.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v2.7.2
3+
rev: v2.7.3
44
hooks:
55
- id: pyupgrade
66
args: ["--py36-plus"]
@@ -12,31 +12,31 @@ repos:
1212
args: ["--target-version", "py36"]
1313

1414
- repo: https://github.com/PyCQA/isort
15-
rev: 5.5.3
15+
rev: 5.6.4
1616
hooks:
1717
- id: isort
1818

1919
- repo: https://gitlab.com/pycqa/flake8
20-
rev: 3.8.3
20+
rev: 3.8.4
2121
hooks:
2222
- id: flake8
2323
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
2424

2525
- repo: https://github.com/pre-commit/pygrep-hooks
26-
rev: v1.6.0
26+
rev: v1.7.0
2727
hooks:
2828
- id: python-check-blanket-noqa
2929

3030
- repo: https://github.com/pre-commit/pre-commit-hooks
31-
rev: v3.2.0
31+
rev: v3.3.0
3232
hooks:
3333
- id: check-merge-conflict
3434
- id: check-yaml
3535
- id: end-of-file-fixer
3636
- id: trailing-whitespace
3737

3838
- repo: https://github.com/prettier/prettier
39-
rev: 2.1.1
39+
rev: 2.1.2
4040
hooks:
4141
- id: prettier
4242
args: [--prose-wrap=always, --print-width=88]

.travis.yml

-30
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ repo (and have `svn` installed), you can just do something like this:
4242

4343
## Gathering more photos
4444

45-
[![Build Status](https://travis-ci.org/unitedstates/images.svg?branch=gh-pages)](https://travis-ci.org/unitedstates/images)
46-
[![Coverage Status](https://coveralls.io/repos/unitedstates/images/badge.svg?branch=gh-pages&service=github)](https://coveralls.io/github/unitedstates/images?branch=gh-pages)
45+
[![GitHub Actions status](https://github.com/unitedstates/images/workflows/Test/badge.svg)](https://github.com/unitedstates/images/actions)
46+
[![codecov](https://codecov.io/gh/unitedstates/images/branch/master/graph/badge.svg)](https://codecov.io/gh/unitedstates/images)
4747

4848
This project uses a Python script that scrapes the
4949
[Government Printing Office's Member Guide](https://memberguide.gpo.gov/) for official

0 commit comments

Comments
 (0)