diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 61f0c8a..e210751 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -12,6 +12,7 @@ on: release: types: [published] + jobs: deploy: @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..29a9b5b --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c36f90a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -dist: xenial -language: python -matrix: - include: - - python: '3.5' - env: - IPYTHON_VERSION='7.9' - PANDAS_VERSION='0.24.2' - - python: '3.6' - env: - IPYTHON_VERSION='7' - PANDAS_VERSION='1' - - python: '3.7' - env: - IPYTHON_VERSION='7' - PANDAS_VERSION='1' - - python: '3.8' - env: - IPYTHON_VERSION='7' - PANDAS_VERSION='1' -install: -- pip install IPython==$IPYTHON_VERSION -- pip install pandas==$PANDAS_VERSION -- pip install .[test] -script: -- python -c 'import pytorch_memlab' -- pytest test/test_mem_reporter.py -deploy: - provider: pypi - user: yoursky - on: - tags: true - python: 3.8 - password: - secure: P0hSqy9eGKVG/0Cu8yE1+I+V0gIUbc+B7srJTsyJPC4+COv7BqIrt1NG+3+vWdocJLuYiTbf3zpUBozdvHH0XDV8Ki0rjsQOm607Fe+d30JCaL3sXLJOe8qwbizx9nmTS04AORc7nyzn4Tc3H10zDfwxL5uk73H6mwaoMlh2v2sizB8G6Ce4kH9JXWarKahKPPSdt2u0o533Bm5/rfNzxLifGmG7o2OYIXmUbeC54f4nhBCihtc+sjKR54qfopH/Gnpl1fnFK2Q5aMOM2yUj7mrjNLgDeAECigKGZpn/uuYyy/dSJKvPFoHFP52HS6x+9/aVUUgwEhqyYZ3tFJgkyeLPVnuP5Pv7wQyZXbIBchPwljswgjxI/+8ANRM6WMUhBbnOUQPPd/6AmW6xdaJf2l0461jGqhxAUGRKpn/odFIEly3TcizIzHjkOqPbS4xkKgN7s40ai8ZFLIUXmbqa7r/dScdu7qjvRYIn+obTCIq0lR3gTZLNfHHBCYFOcLD0anlDakONaiY4++xzDw88ancLQhN5L5rsQge4QNdZS8s88gbPtei+3DfnGsUnYWWplAHdxJ+A8/CrtBrtM18E3mOuwSdKbCwd54YmL9E+KcRcL/WRpedWjNybiBCDvRoO0iw3+2EnkrTLpsuTtiXAu+oe2h1XoMyYbeVjaVVsN44=