whispering/.github/workflows/ci.yml

55 lines
1.3 KiB
YAML
Raw Normal View History

2022-09-23 10:20:11 +00:00
---
name: CI
2022-09-27 03:24:49 +00:00
on: # yamllint disable-line rule:truthy
push:
pull_request:
2022-09-29 06:33:04 +00:00
types:
- opened
- synchronize
- reopened
2022-09-23 10:20:11 +00:00
jobs:
ci:
2022-10-09 15:06:37 +00:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
2022-10-12 02:06:34 +00:00
python-version: ["3.8", "3.9", "3.10"]
2022-09-23 10:20:11 +00:00
steps:
- uses: actions/checkout@v3
2022-10-08 15:24:34 +00:00
- name: Get tags
2022-10-12 02:26:23 +00:00
run: git fetch --tags origin -f
2022-10-09 15:14:03 +00:00
- uses: awalsh128/cache-apt-pkgs-action@v1.1.3
2022-10-09 15:14:03 +00:00
if: runner.os == 'Linux'
with:
packages: portaudio19-dev
version: 1.0
2022-09-23 10:20:11 +00:00
- uses: actions/setup-python@v4
with:
2022-10-12 02:06:34 +00:00
python-version: ${{ matrix.python-version }}
2022-09-23 10:20:11 +00:00
- name: Install Poetry Action
uses: snok/install-poetry@v1.3.3
2022-09-23 10:20:11 +00:00
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
2022-10-12 02:06:34 +00:00
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('**/package-lock.json') }}-2
2022-09-23 10:20:11 +00:00
- run: pip install poetry
- run: poetry install
- uses: actions/setup-node@v3
with:
2022-10-09 15:06:59 +00:00
node-version: '16'
2022-09-23 10:20:11 +00:00
cache: npm
- run: npm install
- run: poetry run make -j $(nproc)