-
Notifications
You must be signed in to change notification settings - Fork 585
95 lines (92 loc) · 2.47 KB
/
ci.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
merge_group:
branches:
- main
types:
- checks_requested
jobs:
test-go:
name: "Test Go"
strategy:
fail-fast: false
matrix:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Python dependencies
run: |
python -m pip install --no-cache uv
python -m uv pip install '.'
- name: Build
run: make cog
- name: Lint
run: make lint-go || true
- name: Test
run: make test-go
test-python:
name: "Test Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest-8-cores
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --no-cache uv
python -m uv pip install '.[dev]'
- name: Lint
run: |
if [[ $(python -c 'import sys; print(sys.version_info >= (3, 10))') == "True" ]]; then
make lint-python || true
fi
- name: Test
run: make test-python
env:
HYPOTHESIS_PROFILE: ci
# cannot run this on mac due to licensing issues: https://github.com/actions/virtual-environments/issues/2150
test-integration:
name: "Test integration"
runs-on: ubuntu-latest-16-cores
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Python dependencies
run: |
python -m pip install --no-cache uv
python -m uv pip install '.[dev]'
- name: Test
run: make test-integration