Skip to content

Commit

Permalink
Use github CI (#43)
Browse files Browse the repository at this point in the history
* Add test for every push

* Remove test in pypi-publish workflow

* Fix python version

* Remove travis CI
  • Loading branch information
Stonesjtu authored Oct 28, 2021
1 parent bafb745 commit 80f9a9d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 40 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
release:
types: [published]


jobs:
deploy:

Expand All @@ -22,16 +23,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ipython pandas
pip install .[test]
- name: Test
run: |
python -c 'import pytorch_memlab'
pytest test/test_mem_reporter.py
- name: Build package
run: python -m build
- name: Publish package
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Test

on: push

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8']

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ipython pandas
pip install .[test]
- name: Test
run: |
python -c 'import pytorch_memlab'
pytest test/test_mem_reporter.py
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

0 comments on commit 80f9a9d

Please sign in to comment.