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
46 changes: 0 additions & 46 deletions .github/workflows/benchmark.yml

This file was deleted.

48 changes: 24 additions & 24 deletions .github/workflows/go.yml → .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
name: Go build and test
name: build-and-test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

concurrency:
group: go-${{ github.ref }}
cancel-in-progress: true
workflow_call:

jobs:
build:

with-go:
strategy:
matrix:
go-version: [1.22.5]
platform: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.platform }}

steps:

- name: Set up Go ${{ matrix.node-version }}
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
Expand All @@ -43,17 +31,29 @@ jobs:
GITHUB_TOKEN_PUBLIC: ${{ secrets._GITHUB_TOKEN_PUBLIC }}
GITLAB_API_TOKEN: ${{ secrets.GITLAB_API_TOKEN }}
GITLAB_PROJECT_ID: ${{ secrets.GITLAB_PROJECT_ID }}
lint:

with-node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
defaults:
run:
working-directory: webui
steps:
- name: Install Go
uses: actions/setup-go@v5
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
go-version: 1.19.4
node-version: ${{ matrix.node-version }}

- name: Checkout code
- name: Check out code
uses: actions/checkout@v4

- name: Check Code Formatting
run: find . -name "*.go" | while read line; do [ -z "$(gofmt -d "$line" | head)" ] || exit 1; done
- name: Install
run: make install

- name: Build
run: make build

- name: Test
run: make test
57 changes: 0 additions & 57 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/codespell.yml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: lint

on:
workflow_call:

jobs:
filter:
name: filter
runs-on: ubuntu-latest
outputs:
golang: ${{ steps.filter.outputs.golang }}
golang_files: ${{ steps.filter.outputs.golang_files }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
list-files: shell
filters: |
golang:
- added|modified: '**/*.go'
- added|modified: '/go.sum'
- added|modified: '/go.mod'

codeql:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go, javascript

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

spelling:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check spelling
uses: codespell-project/actions-codespell@v2

go:
runs-on: ubuntu-latest
needs:
- filter
if: needs.filter.outputs.golang == 'true'
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.5

- name: Checkout code
uses: actions/checkout@v4

- name: Check Code Formatting
run: |
test -z "$(gofmt -d ${{ needs.filter.outputs.golang_files }})" || exit 1
42 changes: 0 additions & 42 deletions .github/workflows/nodejs.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# //.github/workflows:presubmit.yml
#
# This file exists to define the steps executed for a push to each tree matching
# the pattern `refs/heads/*`, excluding the default ref. For configuring the
# steps that occur after a push to the trunk branch, see
# `//.github/workflows:trunk.yml`.
---
name: presubmit

on:
push:
branches-ignore:
- master

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
uses: ./.github/workflows/lint.yml

build-and-test:
uses: ./.github/workflows/build-and-test.yml
secrets: inherit
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build release binaries

on:
workflow_dispatch:
push:
tags:
- "v*"
Expand All @@ -13,7 +12,6 @@ concurrency:
jobs:
build-release:
runs-on: "ubuntu-latest"

steps:
- name: Set up Go
uses: actions/setup-go@v5
Expand Down
Loading