Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 7 additions & 6 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ jobs:
with:
go-version: stable
cache-dependency-path: "**/go.sum"
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
- name: Check generated code
run: ./script/generate.sh --check
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
path: |
bin/golangci-lint
bin/custom-gcl
key: ${{ runner.os }}-${{ runner.arch }}-tools-${{ hashFiles('.custom-gcl.yml', 'tools/**/go.mod', 'tools/**/go.sum', 'tools/**/*.go') }}
- run: script/lint.sh
version: v2.10.1 # sync with version in .custom-gcl.yml
experimental: "automatic-module-directories"
- name: Check OpenAPI
run: ./script/metadata.sh update-openapi --validate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that is it going to check the openapi YAML file every time? If so, I have a concern with this.
That YAML file gets updated frequently (daily?) on the GitHub side, and gets a new hash every time it changes, which would mean that we would be out-of-date with it most of them time.

As it currently stands, we have the freedom and flexibility to update our YAML file when it benefits us to do so, and I would like to continue with this luxury if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I didn't change the previous behaviour.
.script/lint.sh validates OpenAPI every time when running on GitHub Actions:

image

https://github.com/google/go-github/actions/runs/23317729164/job/67821480217#step:5:21

env:
CHECK_GITHUB_OPENAPI: 1
GITHUB_TOKEN: ${{ github.token }}
13 changes: 0 additions & 13 deletions example/newreposecretwithlibsodium/go.mod

This file was deleted.

7 changes: 0 additions & 7 deletions example/newreposecretwithlibsodium/go.sum

This file was deleted.

158 changes: 0 additions & 158 deletions example/newreposecretwithlibsodium/main.go

This file was deleted.

4 changes: 2 additions & 2 deletions script/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ MOD_DIRS="$(git ls-files '*go.mod' | xargs dirname | sort -u)"
# Override with LINT_JOBS, otherwise use detected CPU count.
: "${LINT_JOBS:=$(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)}"

LINT_DIRS="$(printf '%s\n' "$MOD_DIRS" | grep -v '^example/newreposecretwithlibsodium$')"
LINT_DIRS="$(printf '%s\n' "$MOD_DIRS")"

FAILED_COUNT=0
LINT_FAILED=0
Expand All @@ -51,7 +51,7 @@ wait_pids() {
# Identify the directory for this PID
dir=$(echo "$DIRS_IN_FLIGHT" | awk -v i="$i" '{print $i}')
log_file="$LOG_DIR/$(echo "$dir" | tr '/' '_').log"

if wait "$pid"; then
printf "${GREEN}✔ %-40s [ PASS ]${NC}\n" "$dir"
else
Expand Down
1 change: 0 additions & 1 deletion script/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ fi
MOD_DIRS="$(git ls-files '*go.mod' | xargs dirname | sort)"

for dir in $MOD_DIRS; do
[ "$dir" = "example/newreposecretwithlibsodium" ] && continue
echo "testing $dir"
(
cd "$dir"
Expand Down
Loading