Actions: Introduce actionlint (#105224)

This commit is contained in:
Mariell Hoversholm
2025-05-13 08:23:59 +02:00
committed by GitHub
parent 99273f15eb
commit c92ff0ca75
20 changed files with 304 additions and 131 deletions
+13 -4
View File
@@ -30,8 +30,11 @@ jobs:
go-version-file: go.mod
cache: true
- run: |
go_packages="$(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)"
IFS=' ' read -ra packages <<< "$go_packages"
make gen-go
go test -tags=sqlite -timeout=5m -run '^TestIntegration' $(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)
go test -tags=sqlite -timeout=5m -run '^TestIntegration' "${packages[@]}"
mysql:
name: MySQL
runs-on: ubuntu-latest-8-cores
@@ -62,10 +65,13 @@ jobs:
go-version-file: go.mod
cache: true
- run: |
go_packages="$(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)"
IFS=' ' read -ra packages <<< "$go_packages"
sudo apt-get update -yq && sudo apt-get install mariadb-client
cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h 127.0.0.1 -P 3306 -u root -prootpass --disable-ssl-verify-server-cert
mariadb -h 127.0.0.1 -P 3306 -u root -prootpass --disable-ssl-verify-server-cert < devenv/docker/blocks/mysql_tests/setup.sql
make gen-go
go test -tags=mysql -p=1 -timeout=5m -run '^TestIntegration' $(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)
go test -tags=mysql -p=1 -timeout=5m -run '^TestIntegration' "${packages[@]}"
postgres:
name: Postgres
runs-on: ubuntu-latest-8-cores
@@ -95,7 +101,10 @@ jobs:
PGPASSWORD: grafanatest
POSTGRES_HOST: 127.0.0.1
run: |
go_packages="$(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)"
IFS=' ' read -ra packages <<< "$go_packages"
sudo apt-get update -yq && sudo apt-get install postgresql-client
psql -p 5432 -h 127.0.0.1 -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
make gen-go
go test -p=1 -tags=postgres -timeout=5m -run '^TestIntegration' $(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)
go test -p=1 -tags=postgres -timeout=5m -run '^TestIntegration' "${packages[@]}"