diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..afd6c1d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,38 @@ +name: build + +# Controls when the action will run. +on: [push, pull_request] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + tests: + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + matrix: + python-version: ['3,7', '3.8', '3.9', '3.10', '3.11'] + 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 Python dependencies + run: | + pip install --upgrade pip + pip install -r requirements.txt + pip install -U numpy + pip install mypy + pip install types-PyYAML + pip install pytest + pip install pytest-cov + pip install . + pip list + - name: Run tests + run: | + pytest --cov-config=.coveragerc --cov=vasppy --cov-report lcov + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@1.1.3 + with: + path-to-lcov: ./coverage.lcov + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 695a7c4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -branches: - only: - - master - - devel - -sudo: required - -before_install: - - sudo apt-get install gfortran - - pip install coveralls - -language: python -notifications: - email: false -python: - - "3.7" - - "3.7-dev" - - "3.8" - - "3.8-dev" - - "3.9" - - "3.9-dev" -os: - - linux - -install: - - pip install -U numpy - - pip install -r requirements.txt - - git clone https://github.com/jameskermode/f90wrap - - pip install ./f90wrap - - pip install -U numpy -before_script: - - gfortran -v - - cd crystal_torture - - f2py -c --opt='-O3' --f90flags='-fopenmp' -lgomp -m dist dist.f90 - - gfortran -c -O3 -fPIC tort.f90 - - f2py-f90wrap -c --opt='-O3' --f90flags='-fopenmp' -lgomp -m _tort f90wrap_tort.f90 tort.o - - cd ../ - -script: - # - python -m unittest discover - - coverage run --rcfile=.coveragerc -m unittest discover - -after_success: - - coveralls