Skip to content

Add CI workflow for build and test - #7

Closed
EdwardPalmer99 wants to merge 1 commit into
masterfrom
EdwardPalmer99/setup-github-ci-action
Closed

Add CI workflow for build and test#7
EdwardPalmer99 wants to merge 1 commit into
masterfrom
EdwardPalmer99/setup-github-ci-action

Conversation

@EdwardPalmer99

Copy link
Copy Markdown
Owner

Set up CI workflow for building and testing the project using Bazel.

Set up CI workflow for building and testing the project using Bazel.
Copilot AI review requested due to automatic review settings March 21, 2026 21:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions CI workflow intended to build and run unit tests with Bazel on pushes and pull requests.

Changes:

  • Introduces a new GitHub Actions workflow under .github/workflows/.
  • Runs bazel build //... --config=release.
  • Runs bazel test //... --config=release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines +5 to +8
branches: [ "master" ]
pull_request:
branches: [ "master" ]

Copilot AI Mar 21, 2026

Copy link

Choose a reason for hiding this comment

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

This workflow only runs for pushes/PRs on the master branch. If you want CI to validate PRs from any branch (common for feature branches), consider removing the branches filter under pull_request, and/or triggering pushes on the repository’s default branch (often main).

Suggested change
branches: [ "master" ]
pull_request:
branches: [ "master" ]
branches: [ "main" ]
pull_request:

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +13 to +14
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0

Copilot AI Mar 21, 2026

Copy link

Choose a reason for hiding this comment

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

For supply-chain safety, consider pinning GitHub Actions (e.g., actions/checkout and bazel-contrib/setup-bazel) to a commit SHA instead of a mutable tag like @v4 / @0.14.0. This reduces the risk of an upstream tag being moved to unexpected code.

Suggested change
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: bazel-contrib/setup-bazel@4d953e67229547324f8a156392c767bdafa5df42 # 0.14.0

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +13 to +25
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Build
run: bazel build //... --config=release
- name: Unit Tests
run: bazel test //... --config=release

Copilot AI Mar 21, 2026

Copy link

Choose a reason for hiding this comment

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

steps: is not indented correctly. As written, the - uses: entries are siblings of steps rather than elements of the steps array, which will make the workflow YAML invalid (or the job have no steps). Indent each - ... under steps:.

Suggested change
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Build
run: bazel build //... --config=release
- name: Unit Tests
run: bazel test //... --config=release
- uses: actions/checkout@v4
- uses: bazel-contrib/setup-bazel@0.14.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Build
run: bazel build //... --config=release
- name: Unit Tests
run: bazel test //... --config=release

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants