-
Notifications
You must be signed in to change notification settings - Fork 156
105 lines (104 loc) · 3.05 KB
/
pr.yml
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
96
97
98
99
100
101
102
103
104
105
name: PR Build Check
on:
pull_request:
jobs:
site:
name: Build Website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: ./.github/actions/dev-tool-python
with:
python-version: "3.8"
- name: Install dependencies
run: python3 -m pip install -r ./site/requirements.txt
- name: Generate Static Site
run: mkdocs build
working-directory: ./site
editorconfig-checker:
name: Check editorconfig
runs-on: ubuntu-latest
steps:
- uses: editorconfig-checker/action-editorconfig-checker@v2
proto-format-check:
name: Check Protobuf Style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
- run: buf format --diff --exit-code
proto:
name: Check Protobuf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
- uses: bufbuild/buf-lint-action@v1
- name: Compile protobuf
run: buf generate
yamllint:
name: Lint YAML extensions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run yamllint
run: yamllint .
yamlvalidate:
name: Validate YAML extensions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm install -g ajv-cli
- run: |
set -euo pipefail
for i in $(ls);
do
ajv validate -s ../text/simple_extensions_schema.yaml --strict=true --spec=draft2020 -d "$i"
done
working-directory: ./extensions
dry_run_release:
name: Dry-run release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: bufbuild/[email protected]
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: ./ci/release/dry_run.sh
python-style:
name: Style-check and lint Python files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install --upgrade pip black==22.3.0 flake8==4.0.1
- name: Black
run: python3 -m black --diff --check .
- name: Flake8
run: python3 -m flake8 .
check-proto-prefix:
name: Check proto-prefix.py
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bufbuild/[email protected]
- name: Run proto-prefix.py
run: tools/proto_prefix.py output test proto go_package=github.com/test/proto
- name: Modify buf config to build rewritten proto files
run: |
echo "version: v1" > buf.work.yaml
echo "directories:" >> buf.work.yaml
echo " - output" >> buf.work.yaml
- name: Compile rewritten proto files
run: buf generate