-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Action for the PR build tests
This includes: - gofmt - yamllint - building the go code - license check - golint
- Loading branch information
1 parent
b85954f
commit 6a5dc73
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Tekton PR | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: ["main"] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build: | ||
name: Build tests | ||
runs-on: ubuntu-24.04 | ||
|
||
env: | ||
GOPATH: ${{ github.workspace }} | ||
GO111MODULE: '' | ||
|
||
steps: | ||
- name: Harden runner | ||
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
path: ${{ github.workspace }}/src/github.com/tektoncd/dashboard | ||
|
||
- name: Set up Go 1.22 | ||
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0 | ||
with: | ||
go-version: 1.22.5 | ||
|
||
- name: Install dependencies | ||
run: | | ||
echo "${GOPATH}/bin" >> "$GITHUB_PATH" | ||
GO111MODULE="on" go install github.com/google/[email protected] | ||
- name: Run tests | ||
working-directory: ${{ github.workspace }}/src/github.com/tektoncd/dashboard | ||
run: | | ||
echo $GOPATH | ||
echo $PATH | ||
ls | ||
./test/presubmit-tests.sh --build-tests |