Skip to content

Commit

Permalink
Merge pull request #188 from hugovk/rm-travis
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Nov 7, 2020
2 parents fe058f6 + 1f3b4ba commit f8c582a
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 68 deletions.
32 changes: 2 additions & 30 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,11 @@ name: Lint

on: [push, pull_request]

env:
FORCE_COLOR: 1

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.cache/pre-commit
key:
lint-v1-${{ hashFiles('**/setup.py') }}-${{
hashFiles('**/.pre-commit-config.yaml') }}
restore-keys: |
lint-v1-
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U pre-commit
- name: Lint
run: pre-commit run --all-files --show-diff-on-failure
env:
PRE_COMMIT_COLOR: always
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.0
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test

on: [push, pull_request]

env:
FORCE_COLOR: 1

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 }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ matrix.python-version }}-
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U wheel
python -m pip install -r requirements.txt
python -m pip install coverage
- name: Tox tests
shell: bash
run: |
coverage run --append --source scripts test/test_gpo_member_photos.py
coverage run --append --source scripts scripts/missing.py
coverage report
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
name: Python ${{ matrix.python-version }}
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
rev: v2.7.3
hooks:
- id: pyupgrade
args: ["--py36-plus"]
Expand All @@ -12,31 +12,31 @@ repos:
args: ["--target-version", "py36"]

- repo: https://github.com/PyCQA/isort
rev: 5.5.3
rev: 5.6.4
hooks:
- id: isort

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.6.0
rev: v1.7.0
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v3.3.0
hooks:
- id: check-merge-conflict
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/prettier/prettier
rev: 2.1.1
rev: 2.1.2
hooks:
- id: prettier
args: [--prose-wrap=always, --print-width=88]
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ repo (and have `svn` installed), you can just do something like this:

## Gathering more photos

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

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

0 comments on commit f8c582a

Please sign in to comment.