-
Notifications
You must be signed in to change notification settings - Fork 15
75 lines (74 loc) · 2.28 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
---
name: "Test"
on:
push:
branches:
- "main"
pull_request:
branches: ["*"]
jobs:
pytest:
name: "Unit and Integration Tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
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@v3"
- uses: "actions/setup-python@v4"
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
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
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: "authzed/actions/buf-generate@main"
with:
version: "1.15.1"