Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions .github/workflows/backend-lint-test.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,39 @@
---
name: "Backend verify"
on:
push:
tags:
- v*
branches:
- master
paths:
- 'backend/**.go'
- 'backend/go.mod'
- '.github/workflows/backend-lint-test.yml'
pull_request:
paths:
- 'backend/**.go'
- 'backend/go.mod'
- '.github/workflows/backend-lint-test.yml'
workflow_call:
permissions:
contents: read
jobs:
verify:
name: Lint & Test Backend
lint:
name: Lint Backend
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: 'backend/go.mod'
cache-dependency-path: 'backend/go.sum'
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.4
working-directory: backend
args: --timeout=10m --config=.golangci.yaml

test:
name: Test Backend
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version-file: 'backend/go.mod'
cache-dependency-path: 'backend/go.sum'
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Unit & Integration Tests
run: task backend:test-integration
run: task backend:test-integration
21 changes: 21 additions & 0 deletions .github/workflows/fork-pr-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: PR verification (forks)
on:
pull_request:
paths:
- "frontend/**"
- "backend/**"
permissions:
contents: read
jobs:
backend-verify:
if: github.event.pull_request.head.repo.fork == true
uses: ./.github/workflows/backend-lint-test.yml
permissions:
contents: read

frontend-verify:
if: github.event.pull_request.head.repo.fork == true
uses: ./.github/workflows/frontend-verify.yml
permissions:
contents: read
10 changes: 0 additions & 10 deletions .github/workflows/frontend-verify.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
---
name: "Frontend Lint & Compile check"
on:
push:
branches:
- master
paths:
- "frontend/**"
- ".github/workflows/frontend-verify.yml"
pull_request:
paths:
- "frontend/**"
- ".github/workflows/frontend-verify.yml"
workflow_call:
env:
CI: true
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/repository-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
paths:
- "frontend/**"
- "backend/**"
- '.github/workflows/repository-dispatch.yml'
- '.github/workflows/backend-lint-test.yml'
- '.github/workflows/frontend-verify.yml'
tags:
- '*'
branches:
Expand All @@ -25,6 +28,7 @@ jobs:

dispatch:
needs: [backend-verify, frontend-verify]
if: "!failure() && !cancelled()"
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -51,4 +55,4 @@ jobs:
token: ${{ env.ACTIONS_BOT_TOKEN }}
repository: redpanda-data/console-enterprise
event-type: push
client-payload: '{"branch": "${{ github.ref_name }}", "commit_sha": "${{ github.sha }}"}'
client-payload: '{"branch": "${{ github.ref_name }}", "commit_sha": "${{ github.sha }}"}'
2 changes: 1 addition & 1 deletion taskfiles/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ tasks:
- install-tparse
cmds:
- |
{{ .PATH_PREFIX }} go test -race --tags=integration -json -p=1 {{.CLI_ARGS | default "./..." }} | {{ .BUILD_ROOT }}/bin/go/tparse
{{ .PATH_PREFIX }} go test -race --tags=integration -json -p=2 {{.CLI_ARGS | default "./..." }} | {{ .BUILD_ROOT }}/bin/go/tparse

cover:
dir: "{{.BACKEND_ROOT}}"
Expand Down