Skip to content

CI

CI #1464

Workflow file for this run

name: CI
on:
push:
branches: ['master']
tags: ['v*']
pull_request:
branches: ['master']
schedule:
# Every hour
- cron: '0 * * * *'
env:
CASS_DRIVER_NO_CYTHON: '1'
jobs:
lint:
name: Run lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python_version: ['3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout source repository for Python ${{ matrix.python_version }}
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Run lint on Python ${{ matrix.python_version }}
run: make lint
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python_version: ['3.8', '3.9', '3.10', '3.11']
steps:
- name: Checkout source repository for Python ${{ matrix.python_version }}
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Run tests on Python ${{ matrix.python_version }}
run: make test
release:
name: Build and publish the packages
needs: [lint, test]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python_version: ['3.11']
steps:
- name: Checkout source repository for Python ${{ matrix.python_version }}
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python_version }}
- name: Build the packages
run: make build
- name: Upload built packages to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}