-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: mirror networkx-adapter changes (#3)
- Loading branch information
Showing
26 changed files
with
1,080 additions
and
808 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,56 @@ | ||
name: build | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- 'adbdgl_adapter/**' | ||
- 'tests/**' | ||
- 'setup.py' | ||
- 'setup.cfg' | ||
- 'pyproject.toml' | ||
- '.github/workflows/build.yml' | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- "adbdgl_adapter/adbdgl_adapter/**" | ||
- "adbdgl_adapter/tests/**" | ||
- 'adbdgl_adapter/**' | ||
- 'tests/**' | ||
- 'setup.py' | ||
- 'setup.cfg' | ||
- 'pyproject.toml' | ||
- '.github/workflows/build.yml' | ||
env: | ||
SOURCE_DIR: adbdgl_adapter | ||
PACKAGE_DIR: adbdgl_adapter | ||
TESTS_DIR: tests | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ${{env.SOURCE_DIR}} | ||
strategy: | ||
matrix: | ||
python: ["3.6", "3.7", "3.8", "3.9"] | ||
name: Python ${{ matrix.python }} | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup python | ||
- name: Setup Python ${{ matrix.python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Lint with Black | ||
uses: psf/black@stable | ||
with: | ||
options: "--check --verbose --diff --color" | ||
src: ${{env.PACKAGE_DIR}} | ||
- name: Install dependencies | ||
run: pip install -e . pytest pytest-cov coveralls | ||
- name: Setup pip | ||
run: python -m pip install --upgrade pip setuptools wheel | ||
- name: Install packages | ||
run: pip install .[dev] | ||
- name: Run black | ||
run: black --check --verbose --diff --color ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}} | ||
- name: Run flake8 | ||
run: flake8 ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}} | ||
- name: Run isort | ||
run: isort --check --profile=black ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}} | ||
- name: Run mypy | ||
run: mypy ${{env.PACKAGE_DIR}} ${{env.TESTS_DIR}} | ||
- name: Run pytest | ||
run: | | ||
pytest --cov=${{env.PACKAGE_DIR}} --cov-report term-missing -v --color=yes --no-cov-on-fail --code-highlight=yes | ||
coveralls | ||
run: py.test --cov=${{env.PACKAGE_DIR}} --cov-report xml -v --color=yes --no-cov-on-fail --code-highlight=yes | ||
- name: Publish to coveralls.io | ||
if: matrix.python == '3.8' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: coveralls --service=github |
Oops, something went wrong.