Package modernisation: Python >= 3.9, pyproject.toml, tox #115
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: [pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: | | |
3.9 | |
3.10 | |
3.12 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libblas-dev liblapack-dev libxc-dev | |
python -m pip install --upgrade pip | |
python -m pip install tox coveralls | |
- name: Setup cache for tox | |
id: cache-tox | |
uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/.tox | |
# Invalidate cache when pyproject.toml changes | |
key: ${{ hashFiles('pyproject.toml')}} | |
- name: Test with tox / unittest / coverage | |
run: | | |
tox | |
- name: Upload coverage data | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
coveralls --service=github |