diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8da1fe9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11'] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install numpy scipy matplotlib pyvista codecov + pip install -e . + - name: Run tests + run: coverage run -m vaspy.tests.test_all + - name: Upload coverage + run: codecov diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1bce9f5 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish to PyPI + +on: + push: + tags: + - 'v*' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install build tools + run: pip install build twine + - name: Build package + run: python -m build + - name: Publish to PyPI + run: twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a87e90f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: python -python: - - "2.7" - - "3.5" - -notifications: - email: false - -install: - - sudo apt-get update - # We do this conditionally because it saves us some downloading if the - # version is the same. - - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then - wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; - else - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - fi - - bash miniconda.sh -b -p $HOME/miniconda - - export PATH="$HOME/miniconda/bin:$PATH" - - hash -r - - conda config --set always_yes yes --set changeps1 no - - conda update -q conda - # Useful for debugging any issues with conda - - conda info -a - - # Replace dep1 dep2 ... with your dependencies - - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION atlas numpy scipy matplotlib - - source activate test-environment - - python setup.py install # install vaspy - - pip install codecov - -# command to run tests -script: - - coverage run -m vaspy.tests.test_all - - codecov - diff --git a/README.rst b/README.rst index 46b9b0c..ae9138d 100644 --- a/README.rst +++ b/README.rst @@ -2,24 +2,21 @@ VASPy ===== -.. image:: https://travis-ci.org/PytLab/VASPy.svg?branch=master - :target: https://travis-ci.org/PytLab/VASPy +.. image:: https://github.com/PytLab/VASPy/actions/workflows/ci.yml/badge.svg + :target: https://github.com/PytLab/VASPy/actions :alt: Build Status -.. image:: https://landscape.io/github/PytLab/VASPy/master/landscape.svg?style=flat - :target: https://landscape.io/github/PytLab/VASPy/master - :alt: Code Health - .. image:: https://img.shields.io/codecov/c/github/PytLab/VASPy/master.svg :target: https://codecov.io/gh/PytLab/VASPy + :alt: Coverage -.. image:: https://img.shields.io/badge/python-3.5, 2.7-green.svg - :target: https://www.python.org/downloads/release/python-351/ - :alt: platform +.. image:: https://img.shields.io/badge/python-3.8+-green.svg + :target: https://www.python.org/downloads/ + :alt: Python -.. image:: https://img.shields.io/badge/pypi-v0.8.12-blue.svg - :target: https://pypi.python.org/pypi/vaspy/ - :alt: versions +.. image:: https://img.shields.io/badge/pypi-v0.9.0-blue.svg + :target: https://pypi.org/project/vaspy/ + :alt: PyPI Introduction ------------ diff --git a/setup.py b/setup.py index 8a0c420..0816234 100644 --- a/setup.py +++ b/setup.py @@ -15,24 +15,21 @@ VASPy ===== -.. image:: https://travis-ci.org/PytLab/VASPy.svg?branch=master - :target: https://travis-ci.org/PytLab/VASPy +.. image:: https://github.com/PytLab/VASPy/actions/workflows/ci.yml/badge.svg + :target: https://github.com/PytLab/VASPy/actions :alt: Build Status -.. image:: https://landscape.io/github/PytLab/VASPy/master/landscape.svg?style=flat - :target: https://landscape.io/github/PytLab/VASPy/master - :alt: Code Health - -.. image:: https://codecov.io/gh/PytLab/VASPy/branch/master/graph/badge.svg +.. image:: https://img.shields.io/codecov/c/github/PytLab/VASPy/master.svg :target: https://codecov.io/gh/PytLab/VASPy + :alt: Coverage -.. image:: https://img.shields.io/badge/python-3.5, 2.7-green.svg - :target: https://www.python.org/downloads/release/python-351/ - :alt: platform +.. image:: https://img.shields.io/badge/python-3.8+-green.svg + :target: https://www.python.org/downloads/ + :alt: Python -.. image:: https://img.shields.io/badge/pypi-v0.8.12-blue.svg - :target: https://pypi.python.org/pypi/vaspy/ - :alt: versions +.. image:: https://img.shields.io/badge/pypi-v0.9.0-blue.svg + :target: https://pypi.org/project/vaspy/ + :alt: PyPI Introduction