Skip to content

Commit

Permalink
Merge pull request #110 from akaihola/github-actions
Browse files Browse the repository at this point in the history
Migrate from Travis CI to GitHub actions
  • Loading branch information
akaihola authored Dec 26, 2020
2 parents 4f9714e + 2901f33 commit 0ed1035
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 13 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python package

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade 'pip>=20.3' # strict dependency resolution added in pip 20.3
pip install -e '.[isort,test]'
- name: Test with pytest
run: |
pytest
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Added
Fixed
-----
- ``<commit>...`` now compares always correctly to the latest common ancestor
- Migrate from Travis CI to GitHub Actions


1.2.1_ - 2020-11-30
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ known_third_party = ["pytest"]
src = [
"src",
]
revision = "master..."
revision = "origin/master..."
lint = [
"pylint",
]
2 changes: 2 additions & 0 deletions src/darker/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def __init__(self, root: LocalPath):
def create_repository(cls, root: LocalPath) -> "GitRepoFixture":
"""Fixture method for creating a Git repository in the given directory"""
check_call(["git", "init"], cwd=root)
check_call(["git", "config", "user.email", "[email protected]"], cwd=root)
check_call(["git", "config", "user.name", "CI system"], cwd=root)
return cls(root)

def _run(self, *args: str) -> None:
Expand Down

0 comments on commit 0ed1035

Please sign in to comment.