Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 488ce3f

Browse files
committed
chore: add make gen to ci actions
1 parent b3576c4 commit 488ce3f

File tree

4 files changed

+68
-4
lines changed

4 files changed

+68
-4
lines changed

.github/workflows/ci.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: GoTests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
test-go:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 5
17+
steps:
18+
- uses: actions/setup-go@v5
19+
with:
20+
go-version: 1.22.8
21+
- uses: actions/[email protected]
22+
- name: Make Gen
23+
run: make --output-sync -B gen
24+
- name: Check for unstaged files
25+
run: ./scripts/check_unstaged.sh

.github/workflows/gotest.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,5 @@ jobs:
2222
- name: Install gotestsum
2323
shell: bash
2424
run: go install gotest.tools/gotestsum@latest
25-
- name: Verify terraform provider
26-
run: |
27-
TF_CLI_CONFIG_FILE=$HOME/.terraformrc go test ./... -run=Test_VerifyE2E/Validate -v
2825
- name: Run tests
29-
run: TF_CLI_CONFIG_FILE=$HOME/.terraformrc gotestsum ./...
26+
run: gotestsum ./...

scripts/check_unstaged.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
# shellcheck source=scripts/lib.sh
5+
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
6+
cdroot
7+
8+
FILES="$(git ls-files --other --modified --exclude-standard)"
9+
if [[ "$FILES" != "" ]]; then
10+
mapfile -t files <<<"$FILES"
11+
12+
log
13+
log "The following files contain unstaged changes:"
14+
log
15+
for file in "${files[@]}"; do
16+
log " - $file"
17+
done
18+
19+
log
20+
log "These are the changes:"
21+
log
22+
for file in "${files[@]}"; do
23+
git --no-pager diff -- "$file" 1>&2
24+
done
25+
26+
log
27+
error "Unstaged changes, see above for details."
28+
fi

site/src/types/preview.ts

+14
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export interface ParameterValidation {
6767
readonly validation_min: number | null;
6868
readonly validation_max: number | null;
6969
readonly validation_monotonic: string | null;
70+
readonly validation_invalid: boolean | null;
7071
}
7172

7273
// From web/session.go
@@ -96,6 +97,19 @@ export const ValidationMonotonicIncreasing = "increasing";
9697

9798
// From types/owner.go
9899
export interface WorkspaceOwner {
100+
readonly id: string;
101+
readonly name: string;
102+
readonly full_name: string;
103+
readonly email: string;
104+
readonly ssh_public_key: string;
99105
readonly groups: readonly string[];
106+
readonly login_type: string;
107+
readonly rbac_roles: readonly WorkspaceOwnerRBACRole[];
108+
}
109+
110+
// From types/owner.go
111+
export interface WorkspaceOwnerRBACRole {
112+
readonly name: string;
113+
readonly org_id: string;
100114
}
101115

0 commit comments

Comments
 (0)