-
Notifications
You must be signed in to change notification settings - Fork 15
79 lines (78 loc) · 2.39 KB
/
test.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: "Test"
on:
push:
branches:
- "main"
pull_request:
branches: ["*"]
env:
GRPC_VERSION: "1.62"
BUF_VERSION: "1.30.0"
jobs:
pytest:
name: "Unit and Integration Tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python-version }}"
- name: "Setup Python Environment"
run: "pip install -U pip virtualenv"
- name: "Install Dependencies"
run: |
virtualenv ~/.cache/virtualenv/authzedpy
source ~/.cache/virtualenv/authzedpy/bin/activate
pip install poetry
poetry env info
poetry install
- uses: "authzed/action-spicedb@v1"
with:
version: "latest"
- name: "Pytest"
run: |
source ~/.cache/virtualenv/authzedpy/bin/activate
pytest -vv
protobuf:
name: "Generate & Diff Protobuf"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "3.10"
- name: "Setup Python Environment"
run: "pip install -U pip virtualenv"
- name: "Install Homebrew & gRPC"
run: |
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/runner/.bash_profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
brew install grpc@$GRPC_VERSION
ls /home/linuxbrew/.linuxbrew/bin
- name: "Install Python Dependencies"
run: |
virtualenv ~/.cache/virtualenv/authzedpy
source ~/.cache/virtualenv/authzedpy/bin/activate
pip install poetry
poetry env info
poetry install --with dev
echo "/home/runner/.cache/virtualenv/authzedpy/bin" >> $GITHUB_PATH
python -V
whereis grpc_python_plugin
whereis protoc-gen-mypy
whereis protoc-gen-mypy_grpc
echo $GITHUB_PATH
- uses: "bufbuild/[email protected]"
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"