47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
---
|
|
name: CI
|
|
"on":
|
|
push:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
python-version: ["3.8", "3.9", "3.10"]
|
|
steps:
|
|
- uses: actions/checkout@v3.4.0
|
|
- uses: actions/setup-node@v3.6.0
|
|
with:
|
|
node-version: '16'
|
|
cache: npm
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install Poetry Action
|
|
uses: snok/install-poetry@v1.3.3
|
|
with:
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
|
|
- name: Load cached venv
|
|
id: cached-poetry-dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: .venv
|
|
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- run: pip install poetry
|
|
- run: poetry env use ${{ matrix.python-version }}
|
|
- run: poetry install
|
|
|
|
- run: npm install
|
|
- run: npm test
|
|
- run: poetry run make -j $(nproc) lint_python pyright
|