Skip to content

Commit b14b36c

Browse files
committed
Merge branch 'main' of github.com:opentdf/platform into license-checker
2 parents ffdc3e4 + 642f804 commit b14b36c

File tree

331 files changed

+86334
-5273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+86334
-5273
lines changed

.github/workflows/checks.yaml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: "Checks"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
pull_request_target:
8+
types:
9+
- opened
10+
- edited
11+
- synchronize
12+
push:
13+
branches:
14+
- main
15+
16+
jobs:
17+
pr:
18+
name: Validate PR title
19+
if: contains(fromJSON('["pull_request", "pull_request_target"]'), github.event_name)
20+
runs-on: ubuntu-22.04
21+
permissions:
22+
pull-requests: read
23+
steps:
24+
- uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
28+
go:
29+
runs-on: ubuntu-22.04
30+
if: contains(fromJSON('["push", "pull_request"]'), github.event_name)
31+
permissions:
32+
checks: write
33+
contents: read
34+
pull-requests: read
35+
strategy:
36+
matrix:
37+
directory:
38+
- "."
39+
- sdk
40+
- examples
41+
steps:
42+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
43+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
44+
with:
45+
go-version: "1.21"
46+
cache-dependency-path: |
47+
./go.sum
48+
sdk/go.sum
49+
examples/go.sum
50+
- run: make go.work
51+
- name: golangci-lint
52+
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc
53+
with:
54+
version: v1.55
55+
only-new-issues: true
56+
working-directory: ${{ matrix.directory }}
57+
- run: go test ./... -short
58+
working-directory: ${{ matrix.directory }}
59+
60+
integration:
61+
name: integration tests
62+
runs-on: ubuntu-22.04
63+
if: contains(fromJSON('["push", "pull_request"]'), github.event_name)
64+
needs:
65+
- go
66+
steps:
67+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
68+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
69+
with:
70+
go-version: "1.21"
71+
cache-dependency-path: |
72+
./go.sum
73+
sdk/go.sum
74+
examples/go.sum
75+
- run: make go.work
76+
- run: go test ./integration -race
77+
- run: docker-compose up -d
78+
- run: cp example-opentdf.yaml opentdf.yaml
79+
- run: go run . start &
80+
- run: go install github.com/fullstorydev/grpcurl/cmd/[email protected]
81+
- run: sleep 15
82+
name: wake me up when github action runner supports docker-compose --wait
83+
- run: grpcurl -plaintext localhost:9000 list
84+
- run: grpcurl -plaintext localhost:9000 list attributes.AttributesService
85+
86+
image:
87+
name: image build
88+
if: contains(fromJSON('["push", "pull_request"]'), github.event_name)
89+
runs-on: ubuntu-22.04
90+
needs: integration
91+
steps:
92+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
93+
- uses: docker/setup-buildx-action@v3
94+
- uses: docker/[email protected]
95+
with:
96+
context: .
97+
file: ./Dockerfile
98+
push: false
99+
100+
buflint:
101+
name: Protocol Buffer Lint and Gencode Up-to-date check
102+
if: contains(fromJSON('["push", "pull_request"]'), github.event_name)
103+
runs-on: ubuntu-22.04
104+
steps:
105+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
106+
- uses: bufbuild/buf-setup-action@382440cdb8ec7bc25a68d7b4711163d95f7cc3aa
107+
- uses: bufbuild/buf-lint-action@044d13acb1f155179c606aaa2e53aea304d22058
108+
with:
109+
input: proto
110+
- uses: bufbuild/buf-breaking-action@a074e988ee34efcd4927079e79c611f428354c01
111+
# TODO(#212) Block on breaking changes after protos are frozen
112+
continue-on-error: true
113+
with:
114+
input: proto
115+
against: "https://github.com/opentdf/opentdf-v2-poc.git#branch=main,subdir=proto"
116+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
117+
with:
118+
go-version: "1.21"
119+
cache-dependency-path: |
120+
./go.sum
121+
sdk/go.sum
122+
examples/attributes/go.sum
123+
- run: go get github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
124+
- run: go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
125+
- run: make buf-generate
126+
- name: Restore go.mod after installing protoc-gen-doc
127+
run: git restore go.mod go.sum
128+
- run: git diff
129+
- run: git diff-files --ignore-submodules
130+
- name: Check that files have been formatted before PR submission
131+
run: git diff-files --quiet --ignore-submodules
132+
133+
ci:
134+
if: contains(fromJSON('["push", "pull_request"]'), github.event_name)
135+
needs:
136+
- pr
137+
- go
138+
- integration
139+
- image
140+
- buflint
141+
runs-on: ubuntu-latest
142+
steps:
143+
- if: contains(needs.*.result, 'failure')
144+
run: exit 1
145+
146+
license:
147+
if: contains(fromJSON('["push", "pull_request"]'), github.event_name)
148+
name: license check
149+
runs-on: ubuntu-22.04
150+
steps:
151+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
152+
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
153+
with:
154+
go-version: '1.21'
155+
cache: false
156+
- name: install go-licenses
157+
run: go install github.com/google/go-licenses@5348b744d0983d85713295ea08a20cca1654a45e
158+
- name: check licenses
159+
run: go-licenses check --disallowed_types=forbidden --include_tests ./...
160+

.github/workflows/go-checks.yaml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/nightly-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "Nightly Checks"
22

33
on:
44
schedule:
5-
- cron: '0 0 * * *'
5+
- cron: "0 0 * * *"
66

77
jobs:
88
vulncheck:
@@ -12,4 +12,4 @@ jobs:
1212
- name: govluncheck
1313
uses: golang/govulncheck-action@7da72f730e37eeaad891fcff0a532d27ed737cd4
1414
with:
15-
go-version-file: 'go.mod'
15+
go-version-file: "go.mod"

.github/workflows/pr-checks.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/proto-checks.yaml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ __pycache__
2929

3030
opentdf.yaml
3131
.vscode/settings.json
32+
serviceapp
33+
go.work.sum
34+
go.work
35+
*.zip
36+
examples/examples

0 commit comments

Comments
 (0)