hardcode db password in CI to allow tests from third parties (#1729)
This commit is contained in:
parent
ea40ffd655
commit
c4652d60a7
3 changed files with 9 additions and 21 deletions
11
.github/workflows/bats-mysql.yml
vendored
11
.github/workflows/bats-mysql.yml
vendored
|
@ -6,9 +6,6 @@ on:
|
|||
database_image:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DATABASE_PASSWORD:
|
||||
required: true
|
||||
|
||||
env:
|
||||
PREFIX_TEST_NAMES_WITH_FILE: true
|
||||
|
@ -23,7 +20,7 @@ jobs:
|
|||
database:
|
||||
image: ${{ inputs.database_image }}
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
|
||||
MYSQL_ROOT_PASSWORD: "secret"
|
||||
ports:
|
||||
- 3306:3306
|
||||
|
||||
|
@ -61,7 +58,7 @@ jobs:
|
|||
DB_BACKEND: mysql
|
||||
MYSQL_HOST: 127.0.0.1
|
||||
MYSQL_PORT: 3306
|
||||
MYSQL_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
|
||||
MYSQL_PASSWORD: "secret"
|
||||
MYSQL_USER: root
|
||||
|
||||
- name: "Run tests"
|
||||
|
@ -70,7 +67,7 @@ jobs:
|
|||
DB_BACKEND: mysql
|
||||
MYSQL_HOST: 127.0.0.1
|
||||
MYSQL_PORT: 3306
|
||||
MYSQL_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
|
||||
MYSQL_PASSWORD: "secret"
|
||||
MYSQL_USER: root
|
||||
|
||||
#
|
||||
|
@ -85,7 +82,7 @@ jobs:
|
|||
DB_BACKEND: mysql
|
||||
MYSQL_HOST: 127.0.0.1
|
||||
MYSQL_PORT: 3306
|
||||
MYSQL_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
|
||||
MYSQL_PASSWORD: "secret"
|
||||
MYSQL_USER: root
|
||||
if: ${{ always() }}
|
||||
|
||||
|
|
13
.github/workflows/bats-postgres.yml
vendored
13
.github/workflows/bats-postgres.yml
vendored
|
@ -2,9 +2,6 @@ name: Functional tests (Postgres)
|
|||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
DATABASE_PASSWORD:
|
||||
required: true
|
||||
|
||||
env:
|
||||
PREFIX_TEST_NAMES_WITH_FILE: true
|
||||
|
@ -19,7 +16,7 @@ jobs:
|
|||
database:
|
||||
image: postgres:latest
|
||||
env:
|
||||
POSTGRES_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
|
||||
POSTGRES_PASSWORD: "secret"
|
||||
ports:
|
||||
- 5432:5432
|
||||
options: >-
|
||||
|
@ -62,7 +59,7 @@ jobs:
|
|||
DB_BACKEND: pgx
|
||||
PGHOST: 127.0.0.1
|
||||
PGPORT: 5432
|
||||
PGPASSWORD: ${{ secrets.DATABASE_PASSWORD }}
|
||||
PGPASSWORD: "secret"
|
||||
PGUSER: postgres
|
||||
|
||||
- name: "Run tests (DB_BACKEND: pgx)"
|
||||
|
@ -71,7 +68,7 @@ jobs:
|
|||
DB_BACKEND: pgx
|
||||
PGHOST: 127.0.0.1
|
||||
PGPORT: 5432
|
||||
PGPASSWORD: ${{ secrets.DATABASE_PASSWORD }}
|
||||
PGPASSWORD: "secret"
|
||||
PGUSER: postgres
|
||||
|
||||
- name: "Build crowdsec and fixture (DB_BACKEND: postgres)"
|
||||
|
@ -80,7 +77,7 @@ jobs:
|
|||
DB_BACKEND: postgres
|
||||
PGHOST: 127.0.0.1
|
||||
PGPORT: 5432
|
||||
PGPASSWORD: ${{ secrets.DATABASE_PASSWORD }}
|
||||
PGPASSWORD: "secret"
|
||||
PGUSER: postgres
|
||||
|
||||
- name: "Run tests (DB_BACKEND: postgres)"
|
||||
|
@ -89,7 +86,7 @@ jobs:
|
|||
DB_BACKEND: postgres
|
||||
PGHOST: 127.0.0.1
|
||||
PGPORT: 5432
|
||||
PGPASSWORD: ${{ secrets.DATABASE_PASSWORD }}
|
||||
PGPASSWORD: "secret"
|
||||
PGUSER: postgres
|
||||
|
||||
- name: "Show crowdsec logs"
|
||||
|
|
6
.github/workflows/bats.yml
vendored
6
.github/workflows/bats.yml
vendored
|
@ -34,20 +34,14 @@ jobs:
|
|||
uses: ./.github/workflows/bats-mysql.yml
|
||||
with:
|
||||
database_image: mariadb:latest
|
||||
secrets:
|
||||
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD}}
|
||||
|
||||
mysql:
|
||||
uses: ./.github/workflows/bats-mysql.yml
|
||||
with:
|
||||
database_image: mysql:latest
|
||||
secrets:
|
||||
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD}}
|
||||
|
||||
postgres:
|
||||
uses: ./.github/workflows/bats-postgres.yml
|
||||
secrets:
|
||||
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD}}
|
||||
|
||||
hub:
|
||||
uses: ./.github/workflows/bats-hub.yml
|
||||
|
|
Loading…
Reference in a new issue