ci: add pytest, use actions/cache@v6

This commit is contained in:
Artem Akymenko
2026-07-08 19:26:42 +03:00
parent 783738882f
commit f4cb2c2329
+22 -8
View File
@@ -1,5 +1,6 @@
name: pip install name: CI
run-name: pip install run-name: CI
on: on:
push: push:
branches: [main] branches: [main]
@@ -12,8 +13,9 @@ on:
- 'pyproject.toml' - 'pyproject.toml'
- '.github/workflows/**' - '.github/workflows/**'
workflow_dispatch: workflow_dispatch:
jobs: jobs:
install-and-run: test:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-14, windows-latest] os: [ubuntu-latest, macos-14, windows-latest]
@@ -23,12 +25,24 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v7 uses: actions/checkout@v7
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v6 uses: actions/setup-python@v6
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
cache: pip
- name: Install from repository - name: Cache pip
run: python -m pip install . uses: actions/cache@v6
#- name: Run abogen with:
# run: abogen path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
- name: Run tests
run: pytest tests/ -v --tb=short