-
Notifications
You must be signed in to change notification settings - Fork 69
51 lines (48 loc) Β· 1.6 KB
/
langkit-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: langkit-ci
on:
pull_request:
push:
branches: [main]
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
jobs:
python-ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.5.1
- uses: actions/cache@v3
id: poetry-cache
name: Cache dependencies based on poetry.lock file
with:
path: ./.venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-all-${{ hashFiles('**/poetry.lock') }}
- name: check poetry env
run: poetry env info
- name: Install dependencies
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: make install
- name: Log cache hit
if: steps.poetry-cache.outputs.cache-hit == 'true'
run: echo 'poetry cache hit, skipping poetry install'
- name: Configure whylogs
run: mkdir ~/.whylogs && echo \"\" >> ~/.whylogs/disable_telemetry
- name: Run pre-commit checks
if: ${{ matrix.python-version == 3.8 && matrix.os == 'ubuntu-latest' }}
run: poetry run pre-commit run --all-files
- name: Run build
run: poetry build
- name: Run test
run: poetry run pytest