Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-scatter
Commits
7f2f8c40
Commit
7f2f8c40
authored
Jun 16, 2021
by
rusty1s
Browse files
add github actions
parent
c893aa26
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
0 deletions
+89
-0
.github/workflows/linting.yml
.github/workflows/linting.yml
+28
-0
.github/workflows/testing.yml
.github/workflows/testing.yml
+61
-0
No files found.
.github/workflows/linting.yml
0 → 100644
View file @
7f2f8c40
name
:
Linting
on
:
[
push
,
pull_request
]
jobs
:
flake8
:
runs-on
:
${{ matrix.os }}
strategy
:
matrix
:
os
:
[
ubuntu-latest
]
python-version
:
[
3.6
]
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Install dependencies
run
:
|
pip install flake8
-
name
:
Run linting
run
:
|
flake8 .
.github/workflows/testing.yml
0 → 100644
View file @
7f2f8c40
name
:
Testing
on
:
[
push
,
pull_request
]
jobs
:
pytest
:
runs-on
:
${{ matrix.os }}
strategy
:
matrix
:
os
:
[
ubuntu-latest
,
windows-latest
,
macos-latest
]
python-version
:
[
3.6
]
torch-version
:
[
1.8.0
,
1.9.0
]
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Update pip
run
:
|
pip install --upgrade pip
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
-
name
:
Get pip cache
id
:
pip-cache
run
:
|
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
-
name
:
Cache pip
uses
:
actions/cache@v2
with
:
path
:
${{ steps.pip-cache.outputs.dir }}
key
:
${{ runner.os }}-pip-py${{ matrix.python-version }}-torch==${{ matrix.torch-version }}
-
name
:
Install PyTorch ${{ matrix.torch-version }}
run
:
|
pip install torch==${{ matrix.torch-version}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
-
name
:
Install main package
run
:
|
pip install -e .[test]
-
name
:
Run test-suite
run
:
|
python setup.py test
-
name
:
Generate coverage report
if
:
success()
run
:
|
pip install coverage
coverage xml
-
name
:
Upload coverage report to codecov
uses
:
codecov/codecov-action@v1
if
:
success()
with
:
file
:
coverage.xml
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment