Skip to content

Commit

Permalink
Merge 37d54d4 into 55f0537
Browse files Browse the repository at this point in the history
  • Loading branch information
gwax committed Jun 5, 2022
2 parents 55f0537 + 37d54d4 commit 9124db6
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 35 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: lint

on:
pull_request:
push:
branches:
- trunk

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
cache: pip
cache-dependency-path: |
requirements.txt
test_requirements.txt
- run: pip install -r requirements.txt -r test_requirements.txt
- uses: pre-commit/action@v2.0.3
56 changes: 56 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: pytest

on:
pull_request:
push:
branches:
- trunk

jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
name: Python ${{ matrix.python-version }} pytest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
cache: pip
cache-dependency-path: |
requirements.txt
test_requirements.txt
- name: Install requirements
run: pip install -r requirements.txt -r test_requirements.txt

- name: Execute pytest
run: pytest tests/

- name: Convert coverage
run: coverage lcov

- name: Coveralls Parallel
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
flag-name: python-${{ matrix.python-version }}
path-to-lcov: coverage.lcov
parallel: true

finish:
needs:
- pytest
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
parallel-finished: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
# Profiling data
*.prof

# Coverage data
lcov.info
*.lcov

# Created by https://www.gitignore.io/api/python

### Python ###
Expand Down
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
attrs>=17.4.0
black>=18.6b4
coverage<5.0
coverage>=5.5
doc8>=0.8.0
flake8-bugbear>=17.3.0
flake8-comprehensions>=1.2.1
Expand All @@ -13,6 +13,5 @@ Pygments>=2.3.1
pylint>=2.3.1
pytest-cov>=2.6.0
pytest>=3.0.2
python-coveralls>=2.9.0
responses>=0.10.5
types-requests>=2.27
2 changes: 1 addition & 1 deletion tests/mtg/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_is_strict_basic(name: str, expected: bool) -> None:
pytest.param(
"Viscera Seer",
UUID("dba1cf83-e13d-401e-b76f-b12a51b307f9"),
0,
None,
"VS",
),
],
Expand Down

0 comments on commit 9124db6

Please sign in to comment.