Update Python to >=3.12.6,<3.13 #1389
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: Unit test | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Load cached venv | |
id: cached-poetry-deps | |
uses: actions/cache@v3 | |
with: | |
path: ./.venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-deps.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --with bench | |
- name: Install library | |
run: poetry install --no-interaction --with bench | |
- name: Check format and lint | |
run: | | |
make ci | |
- name: Test with pytest and collect coverage | |
run: | | |
make cov_ci | |
# CI environment is not stable enough for accurate benchmark, so just check | |
# benchmark works without error. | |
- name: Benchmark | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
make benchmark | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 |