Skip to content

Commit

Permalink
new: mirror networkx-adapter changes (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna authored Dec 30, 2021
1 parent c172daf commit 6d6bccb
Show file tree
Hide file tree
Showing 26 changed files with 1,080 additions and 808 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,30 @@
#
name: analyze
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'adbdgl_adapter/**'
- 'tests/**'
- 'setup.py'
- 'setup.cfg'
- 'pyproject.toml'
- '.github/workflows/analyze.yml'
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
branches: [ master ]
paths:
- "adbdgl_adapter/**"
- 'adbdgl_adapter/**'
- 'tests/**'
- 'setup.py'
- 'setup.cfg'
- 'pyproject.toml'
- '.github/workflows/analyze.yml'
schedule:
- cron: "00 9 * * 1"
env:
SOURCE_DIR: adbdgl_adapter
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{env.SOURCE_DIR}}
permissions:
actions: read
contents: read
Expand Down
56 changes: 36 additions & 20 deletions .github/workflows/build.yml
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
Loading

0 comments on commit 6d6bccb

Please sign in to comment.