Skip to content

Commit 3159f8b

Browse files
authored
Add basic CI to setup poetry, build and run tests
2 parents 372e017 + a5dcc52 commit 3159f8b

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/langkit-ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: langkit-ci
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
tags:
8+
- "[0-9]+.[0-9]+.[0-9]+*"
9+
10+
jobs:
11+
python-ci:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macOS-latest, windows-latest]
16+
python-version: ["3.8", "3.9", "3.10", "3.11"]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Install Poetry
21+
uses: abatilo/actions-poetry@v2.0.0
22+
with:
23+
poetry-version: 1.4.1
24+
- name: Set up python with poetry cache
25+
uses: actions/setup-python@v4
26+
id: setup-python
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
cache: poetry
30+
- run: echo 'python ${{ matrix.python-version }} poetry cache hit ${{ steps.setup-python.outputs.cache-hit }}'
31+
32+
- name: Install dependencies
33+
run: poetry install
34+
- name: Run build
35+
run: poetry build
36+
- name: Run test
37+
run: poetry run pytest

0 commit comments

Comments
 (0)