Skip to content

Add GitHub Action for the PR build tests #11

Add GitHub Action for the PR build tests

Add GitHub Action for the PR build tests #11

Workflow file for this run

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]
# Install GolangCI linter: https://github.com/golangci/golangci-lint/
GOLANGCI_VERSION=1.56.2
curl -sL https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_VERSION}/golangci-lint-${GOLANGCI_VERSION}-linux-amd64.tar.gz | tar -C /usr/local/bin -xvzf - --strip-components=1 --wildcards "*/golangci-lint"
- name: Run tests
working-directory: ${{ github.workspace }}/src/github.com/tektoncd/dashboard
run: |
./test/presubmit-tests.sh --build-tests