Skip to content

Commit

Permalink
Consolidate the CI workflows into a single workflow
Browse files Browse the repository at this point in the history
Combine the `E2E` and `Tekton PR` workflows into a single `Tekton CI`
workflow, and include the ability to trigger them manually.

Remove the `push` trigger as it's not necessary. The tests are run on
each PR and can be run on demand if desired or as part of the release pipeline.
  • Loading branch information
AlanGreene authored and tekton-robot committed Jan 8, 2025
1 parent a843ec6 commit bea10b7
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 73 deletions.
62 changes: 57 additions & 5 deletions .github/workflows/e2e.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
name: E2E
name: Tekton CI

permissions:
contents: read

on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -20,6 +17,61 @@ defaults:
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/go-licenses@v1.0.0
# 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
unit-tests:
name: Unit tests
runs-on: ubuntu-24.04

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

- name: Run tests
run: |
./test/presubmit-tests.sh --unit-tests
e2e-tests:
name: E2E tests
runs-on: ubuntu-24.04
Expand Down
68 changes: 0 additions & 68 deletions .github/workflows/pr.yml

This file was deleted.

0 comments on commit bea10b7

Please sign in to comment.