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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: add make gen to ci actions
  • Loading branch information
Emyrk committed Apr 11, 2025
commit 488ce3fc40ad08f64654ac3b0ff033f6fd11f831
25 changes: 25 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: GoTests

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test-go:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.22.8
- uses: actions/[email protected]
- name: Make Gen
run: make --output-sync -B gen
- name: Check for unstaged files
run: ./scripts/check_unstaged.sh
5 changes: 1 addition & 4 deletions .github/workflows/gotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,5 @@ jobs:
- name: Install gotestsum
shell: bash
run: go install gotest.tools/gotestsum@latest
- name: Verify terraform provider
run: |
TF_CLI_CONFIG_FILE=$HOME/.terraformrc go test ./... -run=Test_VerifyE2E/Validate -v
- name: Run tests
run: TF_CLI_CONFIG_FILE=$HOME/.terraformrc gotestsum ./...
run: gotestsum ./...
28 changes: 28 additions & 0 deletions scripts/check_unstaged.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -euo pipefail
# shellcheck source=scripts/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")/lib.sh"
cdroot

FILES="$(git ls-files --other --modified --exclude-standard)"
if [[ "$FILES" != "" ]]; then
mapfile -t files <<<"$FILES"

log
log "The following files contain unstaged changes:"
log
for file in "${files[@]}"; do
log " - $file"
done

log
log "These are the changes:"
log
for file in "${files[@]}"; do
git --no-pager diff -- "$file" 1>&2
done

log
error "Unstaged changes, see above for details."
fi
14 changes: 14 additions & 0 deletions site/src/types/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface ParameterValidation {
readonly validation_min: number | null;
readonly validation_max: number | null;
readonly validation_monotonic: string | null;
readonly validation_invalid: boolean | null;
}

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

// From types/owner.go
export interface WorkspaceOwner {
readonly id: string;
readonly name: string;
readonly full_name: string;
readonly email: string;
readonly ssh_public_key: string;
readonly groups: readonly string[];
readonly login_type: string;
readonly rbac_roles: readonly WorkspaceOwnerRBACRole[];
}

// From types/owner.go
export interface WorkspaceOwnerRBACRole {
readonly name: string;
readonly org_id: string;
}

Loading