Skip to content

Add test suite

Add test suite #32

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- '**'
pull_request: {}
env:
CI: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- uses: eifinger/setup-rye@v2
- run: rye sync
- run: rye lint
- run: rye format --check
test:
name: test py${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
exclude:
# Python 3.8 and 3.9 are not available on macOS 14
- os: macos-13
python-version: '3.10'
- os: macos-13
python-version: '3.11'
- os: macos-13
python-version: '3.12'
- os: macos-latest
python-version: '3.8'
- os: macos-latest
python-version: '3.9'
steps:
- uses: actions/checkout@v4
- name: Ensure requests to production domains fail
run: |
if [ "$NOT_LINUX" == "true" ] ; then
echo "Can't set /etc/hosts configuration on non-Linux runner"
exit 1
fi
echo "203.0.113.0 logfire.dev" | sudo tee -a /etc/hosts
echo "203.0.113.0 logfire-api.pydantic.dev" | sudo tee -a /etc/hosts
echo "203.0.113.0 logfire.pydantic.dev" | sudo tee -a /etc/hosts
env:
NOT_LINUX: runner.os != 'linux'
- name: set up python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: eifinger/setup-rye@v2
- run: rye sync
- run: rye show
- run: rye test