Skip to content

CI

CI #321

Workflow file for this run

name: CI
on:
push:
pull_request:
schedule:
- cron: '0 6 * * 6'
defaults:
run:
shell: bash
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- python: '^3.10'
os: macos-latest
- python: '3.10'
os: windows-latest
- python: 3.9
os: ubuntu-latest
- python: 3.8
os: macos-latest
- python: 3.7
os: windows-latest
- python: 3.7
os: ubuntu-latest
versions: minimal
runs-on: ${{matrix.os}}
steps:
- name: Download source
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python}}
- name: Pin to lowest versions
if: matrix.versions == 'minimal'
run: |
sed -i -E 's/#min //; s/\b >=([0-9])/ ==\1/' pyproject.toml
- name: Install Hatch
run: |
pip install hatch
- name: Install dependencies
run: |
hatch run test:pip freeze
- name: Run tests
run: |
hatch run test:test
style:
runs-on: ubuntu-latest
steps:
- name: Download source
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Hatch
run: |
pip install hatch
- name: Install dependencies
run: |
hatch run style:pip freeze
- name: Check formatting
run: |
hatch run style:format
git diff --exit-code
- name: Install dependencies
run: |
hatch run types:pip freeze
- name: Check types
run: |
hatch run types:check