Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: format and unify github actions workflow definitions (#1320)

Yilong Li3d4c95e321ca
diff --git a/.github/workflows/build-release-image.yml b/.github/workflows/build-release-image.yml
index 6d353f3e1f..0a82390c68 100644
--- a/.github/workflows/build-release-image.yml
+++ b/.github/workflows/build-release-image.yml
@@ -65,7 +65,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: "14"
- cache: "pnpm"
+ cache: pnpm
cache-dependency-path: "frontend/pnpm-lock.yaml"
- run: pnpm install --frozen-lockfile
working-directory: frontend
@@ -76,7 +76,7 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: 1.16
- - name: "Release"
+ - name: Release
uses: goreleaser/goreleaser-action@v2
with:
args: release
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 9da39d3364..de3dea06a5 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -9,16 +9,18 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
-name: "CodeQL"
+name: CodeQL
on:
push:
- branches: [ main ]
+ branches:
+ - main
pull_request:
# The branches below must be a subset of the branches above
- branches: [ main ]
+ branches:
+ - main
schedule:
- - cron: '27 10 * * 3'
+ - cron: "27 10 * * 3"
jobs:
analyze:
@@ -32,40 +34,42 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: [ 'go', 'javascript' ]
+ language:
+ - go
+ - javascript
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- - name: Checkout repository
- uses: actions/checkout@v2
+ - name: Checkout repository
+ uses: actions/checkout@v2
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v1
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v1
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v1
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v1
- # ℹ️ Command-line programs to run using the OS shell.
- # 📚 https://git.io/JvXDl
+ # ℹ️ Command-line programs to run using the OS shell.
+ # 📚 https://git.io/JvXDl
- # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
- # and modify them (or add more) to build your code if your project
- # uses a compiled language
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
- #- run: |
- # make bootstrap
- # make release
+ #- run: |
+ # make bootstrap
+ # make release
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/install-bb.yml b/.github/workflows/install-bb.yml
deleted file mode 100644
index aa2ef05f4d..0000000000
--- a/.github/workflows/install-bb.yml
+++ /dev/null
@@ -1,21 +0,0 @@
-# This workflow tests if scripts/install_bb.sh is working correctly.
-name: install bb
-
-on:
- push:
- branches:
- - "main"
- pull_request:
-
-jobs:
- install:
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- runs-on: ${{matrix.os}}
- steps:
- - uses: actions/checkout@v2
- - name: run install script
- run: ./scripts/install_bb.sh
- - name: check bb version
- run: bb version
diff --git a/.github/workflows/push-dockerhub.yml b/.github/workflows/push-dockerhub.yml
index cec0b0abfc..7d10a7cb04 100644
--- a/.github/workflows/push-dockerhub.yml
+++ b/.github/workflows/push-dockerhub.yml
@@ -1,12 +1,9 @@
-# This is a basic workflow to help you get started with Actions
-
name: Build and push image to docker hub
-# Controls when the workflow will run
on:
- # Triggers the workflow on push or pull request events but only for the main branch
push:
- branches: [main]
+ branches:
+ - main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 81bd6248b0..1cbff433b0 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -1,9 +1,9 @@
-name: build
+name: test
on:
push:
branches:
- - "main"
+ - main
pull_request:
jobs:
@@ -18,6 +18,7 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
version: v1.45.2
+
go-tidy:
runs-on: ubuntu-latest
steps:
@@ -25,10 +26,11 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: 1.17
- - name: Verify tidy
+ - name: Verify go.mod is tidy
run: |
go mod tidy
git diff --exit-code
+
go-tests:
runs-on: ubuntu-latest
steps:
@@ -41,3 +43,16 @@ jobs:
go-version: 1.17
- run: |
go test -v ./...
+
+ # tests if scripts/install_bb.sh is working correctly.
+ install-bb:
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macos-latest]
+ runs-on: ${{matrix.os}}
+ steps:
+ - uses: actions/checkout@v2
+ - name: run install script
+ run: ./scripts/install_bb.sh
+ - name: check bb version
+ run: bb version