Skip to content

Remove tab layout feature flag and unused code #1622

Remove tab layout feature flag and unused code

Remove tab layout feature flag and unused code #1622

Workflow file for this run

name: Tekton CI
permissions:
contents: read
on:
pull_request:
branches: ["main"]
merge_group: {}
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.merge_group.head_ref || github.run_id }}
cancel-in-progress: true
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@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: ${{ github.workspace }}/src/github.com/tektoncd/dashboard
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
cache-dependency-path: "${{ github.workspace }}/src/github.com/tektoncd/dashboard/go.sum"
go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/dashboard/go.mod"
- name: Install dependencies
run: |
echo "${GOPATH}/bin" >> "$GITHUB_PATH"
GO111MODULE="on" go install github.com/google/go-licenses@v1.0.0
# Install GolangCI linter: https://github.com/golangci/golangci-lint/
GOLANGCI_VERSION=2.9.0
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
unit-tests:
name: Unit tests
runs-on: ubuntu-24.04
steps:
- name: Harden runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
cache: npm
node-version-file: .nvmrc
registry-url: 'https://registry.npmjs.org/'
- name: Run tests
run: |
./test/presubmit-tests.sh --unit-tests
e2e-tests:
name: E2E tests
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
k8s-name:
- k8s-oldest
- k8s-latest
dashboard-mode:
- read-only
- read-write
# k8s-name above is used to give stable naming of the checks for branch
# protection config. Map name to corresponding version for use in steps
include:
- k8s-name: k8s-oldest
k8s-version: v1.31.x
- k8s-name: k8s-latest
k8s-version: v1.35.x
env:
ARTIFACTS: ${{ github.workspace }}/artifacts
GOPATH: ${{ github.workspace }}
GO111MODULE: on
KO_DOCKER_REPO: kind.local
steps:
- name: Harden runner
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
path: ${{ github.workspace }}/src/github.com/tektoncd/dashboard
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
cache-dependency-path: "${{ github.workspace }}/src/github.com/tektoncd/dashboard/go.sum"
go-version-file: "${{ github.workspace }}/src/github.com/tektoncd/dashboard/go.mod"
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
cache: npm
cache-dependency-path: src/github.com/tektoncd/dashboard/package-lock.json
node-version-file: src/github.com/tektoncd/dashboard/.nvmrc
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
working-directory: ./
env:
GO111MODULE: "on"
run: |
echo '::group::install ko'
curl -L https://github.com/ko-build/ko/releases/download/v0.15.4/ko_0.15.4_Linux_x86_64.tar.gz | tar xzf - ko
chmod +x ./ko
sudo mv ko /usr/local/bin
echo '::endgroup::'
echo '::group::install kind'
go install sigs.k8s.io/kind@v0.31.0
echo '::endgroup::'
echo '::group::create required folders'
mkdir -p "${ARTIFACTS}"
echo '::endgroup::'
echo "${GOPATH}/bin" >> "$GITHUB_PATH"
- name: Run tests
working-directory: ${{ github.workspace }}/src/github.com/tektoncd/dashboard
env:
DASHBOARD_MODE: ${{ matrix.dashboard-mode }}
SKIP_INITIALIZE: true
run: |
./test/e2e-tests-prow.sh \
--k8s-version ${{ matrix.k8s-version }} \
- name: Upload test results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ failure() }}
with:
name: ${{ matrix.k8s-version }}-${{ matrix.dashboard-mode }}
path: ${{ env.ARTIFACTS }}
# - name: Collect resources from cluster
# uses: chainguard-dev/actions/kind-diag@94389dc7faf4ef9040df90498419535e1bdcb60e # main
# if: ${{ failure() }}
# with:
# artifact-name: ${{ matrix.k8s-version }}-${{ matrix.dashboard-mode }}-logs
# namespace-resources: pods,taskruns,pipelineruns
ci-summary:
# Fan-in job for branch protection: depends on all CI jobs.
# This allows a single "CI summary" check to gate merges,
# instead of listing every individual job in branch protection.
name: CI summary
if: always()
runs-on: ubuntu-24.04
needs:
- build
- unit-tests
- e2e-tests
steps:
- name: Check results
run: |
results=( "${{ needs.build.result }}"
"${{ needs.unit-tests.result }}"
"${{ needs.e2e-tests.result }}" )
for r in "${results[@]}"; do
if [[ "$r" != "success" && "$r" != "skipped" ]]; then
echo "One or more jobs failed or were cancelled ($r)"
exit 1
fi
done
echo "All jobs passed or were skipped"