-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull request #22: Add continuous integration; reformat codebase to Py…
…thon Black Merge in HYP/hypernetx from feature/HYP-262-create-ci-cd-pipelines-to-automate-the-deployment-process to develop * commit '7a0ac8b5557a551c3d377bf458c930334b328ebf': Reformat codebase to Python Black Update precommit hooks Add continuous integration for Github
- Loading branch information
Showing
34 changed files
with
395 additions
and
160 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[run] | ||
omit = */tests/* | ||
omit = */tests/* |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Continuous Integration | ||
|
||
|
||
on: | ||
push: | ||
branches: [master, develop, release/**] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
LANG: en_US.utf-8 | ||
LC_ALL: en_US.utf-8 | ||
|
||
jobs: | ||
|
||
run-tests: | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, macos-12, windows-2022] | ||
python: ['3.7'] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# https://github.com/pre-commit/action | ||
- name: Run pre-commit hooks | ||
uses: pre-commit/[email protected] | ||
|
||
- name: Run tests | ||
run: | | ||
make test-ci |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: check-json | ||
- id: check-toml | ||
- id: end-of-file-fixer | ||
exclude: ^(docs/|hypernetx.egg-info/) | ||
- id: trailing-whitespace | ||
exclude: ^(docs/|hypernetx.egg-info/) | ||
- id: check-merge-conflict | ||
- id: no-commit-to-branch | ||
args: ['--branch', 'master'] # blocks master commits. To bypass do git commit --allow-empty | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.6.0 | ||
hooks: | ||
- id: black | ||
exclude: ^(docs/|hypernetx.egg-info/) | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.910-1 | ||
hooks: | ||
- id: mypy | ||
exclude: (?x)(docs/|tests/) | ||
args: [--no-strict-optional, --ignore-missing-imports] |
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
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
Oops, something went wrong.