Skip to content

Merge pull request #224 from BEMServer/py312 #367

Merge pull request #224 from BEMServer/py312

Merge pull request #224 from BEMServer/py312 #367

Workflow file for this run

name: build
on:
push:
branches: ["master"]
tags: ["*"]
pull_request:
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- {name: '3.9', python: '3.9', tox: py39}
- {name: '3.12', python: '3.12', tox: py312}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- run:
sudo sh -c "echo 'deb https://packagecloud.io/timescale/timescaledb/ubuntu/
`lsb_release -c -s` main' > /etc/apt/sources.list.d/timescaledb.list"
- run:
wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey |
sudo apt-key add -
- run: sudo apt-get update
- run: sudo apt-get install timescaledb-2-postgresql-14
- name: Run test
run: |
python -m pip install --upgrade pip wheel
pip install tox
tox -e${{ matrix.tox }}
- name: Upload coverage
uses: codecov/codecov-action@v3
lint-pre-release:
name: lint
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.12
- run: python -m pip install --upgrade pip wheel
- run: pip install tox
- run: tox -elint
release:
needs: [lint-pre-release, tests]
name: PyPI release
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: python -m pip install --upgrade pip wheel
- run: pip install twine
- run: python setup.py sdist bdist_wheel
- run: twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/*