Skip to content
Open
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
3 changes: 3 additions & 0 deletions .github/actions/bazel-command/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ runs:
with:
separator: +

- run: buf generate
shell: bash

- id: bazel-rdeps-query
if: ${{ inputs.affected_targets_only}}
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/buf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
workflow_call:
inputs:
detect_breaking_changes:
description: Whether to check for breaking changes to protos
type: boolean
default: false
required: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
workflow_call:
inputs:
affected_targets_only:
description: Whether to limit checks to targets affected by modified files
type: boolean
default: false
required: false
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/buildifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
workflow_call:
inputs:
changed_files_only:
description: Whether to limit checks to modified files
type: boolean
default: false
required: false
Expand Down Expand Up @@ -48,6 +49,7 @@ jobs:
fi
if [[ "$fileset" != "" ]]; then
echo "Executing buildifier on: $fileset"
# shellcheck disable=SC2086
buildifier -mode=check -lint=warn $fileset
else
echo "Skipping buildifier; no files to check"
Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: Check PR

on:
pull_request:
branches: [main]
pull_request:
branches: [main]

jobs:
buildifier:
uses: ./.github/workflows/buildifier.yml
with:
changed_files_only: true
buf:
uses: ./.github/workflows/buf.yml
with:
detect_breaking_changes: true
super-linter:
uses: ./.github/workflows/lint.yml
with:
changed_files_only: true
build:
uses: ./.github/workflows/build.yml
with:
affected_targets_only: true
test:
needs: [build]
uses: ./.github/workflows/test.yml
with:
affected_targets_only: true
tilt:
needs: [build]
uses: ./.github/workflows/tilt.yml
buildifier:
uses: ./.github/workflows/buildifier.yml
with:
changed_files_only: true
buf:
uses: ./.github/workflows/buf.yml
with:
detect_breaking_changes: true
super-linter:
uses: ./.github/workflows/lint.yml
with:
changed_files_only: true
build:
uses: ./.github/workflows/build.yml
with:
affected_targets_only: true
test:
needs: [build]
uses: ./.github/workflows/test.yml
with:
affected_targets_only: true
tilt:
needs: [build]
uses: ./.github/workflows/tilt.yml
18 changes: 14 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow executes several linters on changed files based on languages used in your code base whenever
# you push a code or open a pull request.
# you push code or open a pull request.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
Expand All @@ -12,6 +12,7 @@ on:
workflow_call:
inputs:
changed_files_only:
description: Whether to limit checks to modified files
type: boolean
default: false
required: false
Expand All @@ -25,11 +26,20 @@ jobs:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

- name: Set up Buf
uses: bufbuild/buf-setup-action@v0.6.0
with:
version: 1.0.0-rc12

- name: Generate Protos
run: buf generate
shell: bash

- name: Lint Code
uses: github/super-linter/slim@v4
uses: github/super-linter/slim@latest
env:
VALIDATE_ALL_CODEBASE: ${{ !inputs.changed_files_only }}
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# TODO: Reenable github actions validation after https://github.com/rhysd/actionlint/pull/115
VALIDATE_GITHUB_ACTIONS: false
# TODO: Figure out why golangci-lint doesn't see the generated protos
VALIDATE_GO: false
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
workflow_call:
inputs:
affected_targets_only:
description: Whether to limit checks to targets affected by modified files
type: boolean
default: false
required: false
Expand Down