forked from caraml-dev/universal-prediction-interface
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (79 loc) · 2.31 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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: []
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: '1.18.0'
- uses: bufbuild/buf-setup-action@v1
with:
version: '1.11.0'
github_token: ${{ github.token }}
- uses: s4u/[email protected]
with:
java-version: 11
maven-version: 3.8.4
- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: bufbuild/buf-lint-action@v1
- name: generate
run: make setup generate
test-python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: ./gen/python/grpc
run: pip install -e .[test]
- name: Run test
working-directory: ./gen/python/grpc
run: pytest --benchmark-disable
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Install dependencies
working-directory: ./gen/python/grpc
run: pip install -e .[test]
- name: Run test
working-directory: ./gen/python/grpc
run: pytest --benchmark-json output.json
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'pytest'
output-file-path: ./gen/python/grpc/output.json
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: true
upi-echo-server:
uses: ./.github/workflows/publish-upi-echo-server.yaml