mirror of https://github.com/yutto-dev/yutto
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Unit Test
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
merge_group:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
unit-test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12", "3.13", "3.13t"]
|
|
architecture: ["x64"]
|
|
name: Python ${{ matrix.python-version }} on ${{ matrix.architecture }} unit test
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Install python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
architecture: ${{ matrix.architecture }}
|
|
|
|
- name: Install just
|
|
uses: extractions/setup-just@v3
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
just ci-install
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
just ci-test
|
|
|
|
- name: Run benchmarks
|
|
uses: CodSpeedHQ/action@v3
|
|
if: ${{ matrix.python-version == '3.13' && github.event_name != 'merge_group' }}
|
|
with:
|
|
run: uv run pytest --codspeed
|