-
Notifications
You must be signed in to change notification settings - Fork 44
53 lines (50 loc) · 1.65 KB
/
Copy pathci.yml
File metadata and controls
53 lines (50 loc) · 1.65 KB
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
name: CI
on:
# Allow other workflows (e.g. the release/publish workflow) to run the full
# test suite as a gate before building or publishing.
workflow_call:
pull_request:
# Test every feature branch on push. master/develop are intentionally excluded
# here because they are tested through distribute_pypi.yml (which calls this
# workflow) before a build/publish, so we do not run the matrix twice.
push:
branches-ignore:
- master
- develop
# Cancel an in-progress run when a newer commit is pushed to the same ref.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test:
env:
EMBEDDEDPROTO_BUILD_TOKEN: ${{ secrets.EMBEDDEDPROTO_BUILD_TOKEN }}
strategy:
matrix:
os: [ubuntu-24.04]
protoc-version: ["32.x"]
python-version: ["3.10", "3.11", "3.12"]
serialization-mode: ["full", "partial"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install gcovr
run: pip install gcovr==7.0
- name: Setup venv
run: python install.py
- name: Check EmbeddedProto license
run: |
echo "token present: ${EMBEDDEDPROTO_BUILD_TOKEN:+yes}"
./venv/bin/embeddedproto --check-license
- name: Python unit tests
run: python -m unittest discover -s test/python -p 'test_*.py' -v
- name: Build test
run: ./build_test.sh ${{ matrix.serialization-mode }}
- name: Code coverage
run: ./code_coverage.sh