Fix github action container start
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
82
.github/workflows/make.yaml
vendored
82
.github/workflows/make.yaml
vendored
@@ -97,53 +97,6 @@ jobs:
|
|||||||
runs-on: "ubuntu-22.04"
|
runs-on: "ubuntu-22.04"
|
||||||
permissions:
|
permissions:
|
||||||
contents: "read"
|
contents: "read"
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: "postgres:17.4"
|
|
||||||
env:
|
|
||||||
POSTGRES_USER: "postgres"
|
|
||||||
POSTGRES_PASSWORD: "postgres"
|
|
||||||
ports:
|
|
||||||
- "5432:5432"
|
|
||||||
options: >-
|
|
||||||
--health-cmd "pg_isready -U postgres"
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
minio:
|
|
||||||
image: "bitnami/minio:latest"
|
|
||||||
env:
|
|
||||||
MINIO_ROOT_USER: "probod"
|
|
||||||
MINIO_ROOT_PASSWORD: "thisisnotasecret"
|
|
||||||
MINIO_DEFAULT_BUCKETS: "probod-test"
|
|
||||||
ports:
|
|
||||||
- "9000:9000"
|
|
||||||
options: >-
|
|
||||||
--health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1"
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
mailpit:
|
|
||||||
image: "axllent/mailpit:latest"
|
|
||||||
env:
|
|
||||||
MP_DISABLE_VERSION_CHECK: "true"
|
|
||||||
MP_VERBOSE: "false"
|
|
||||||
MP_SMTP_AUTH_ACCEPT_ANY: "true"
|
|
||||||
MP_SMTP_AUTH_ALLOW_INSECURE: "true"
|
|
||||||
ports:
|
|
||||||
- "1025:1025"
|
|
||||||
chrome:
|
|
||||||
image: "chromedp/headless-shell:140.0.7259.2"
|
|
||||||
ports:
|
|
||||||
- "9222:9222"
|
|
||||||
pebble:
|
|
||||||
image: "ghcr.io/letsencrypt/pebble:latest"
|
|
||||||
env:
|
|
||||||
PEBBLE_VA_NOSLEEP: "1"
|
|
||||||
PEBBLE_WFE_NONCEREJECT: "0"
|
|
||||||
PEBBLE_VA_ALWAYS_VALID: "1"
|
|
||||||
ports:
|
|
||||||
- "14000:14000"
|
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4"
|
- uses: "actions/checkout@v4"
|
||||||
- uses: "actions/setup-go@v5"
|
- uses: "actions/setup-go@v5"
|
||||||
@@ -152,14 +105,31 @@ jobs:
|
|||||||
- uses: "actions/setup-node@v4"
|
- uses: "actions/setup-node@v4"
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
|
- run: "sudo apt-get install -y mkcert"
|
||||||
|
- run: "sudo mkcert -install"
|
||||||
|
- uses: "docker/setup-qemu-action@v3"
|
||||||
|
- uses: "docker/setup-buildx-action@v3"
|
||||||
|
- uses: "docker/setup-compose-action@v1"
|
||||||
- run: "npm ci"
|
- run: "npm ci"
|
||||||
- name: "Setup PostgreSQL database"
|
- run: "make stack-up"
|
||||||
env:
|
- run: "make stack-ps"
|
||||||
PGHOST: "localhost"
|
- name: "Inject root CA into e2e config"
|
||||||
PGUSER: "postgres"
|
|
||||||
PGPASSWORD: "postgres"
|
|
||||||
run: |
|
run: |
|
||||||
psql -c "CREATE DATABASE probod_test;"
|
# Use Python to properly inject the root CA PEM content into YAML
|
||||||
- run: "make build"
|
python3 << 'EOF'
|
||||||
- name: "Run e2e tests"
|
import yaml
|
||||||
run: "make test-e2e"
|
|
||||||
|
with open('compose/pebble/certs/rootCA.pem', 'r') as f:
|
||||||
|
root_ca = f.read()
|
||||||
|
|
||||||
|
with open('e2e/console/testdata/config.yaml', 'r') as f:
|
||||||
|
config = yaml.safe_load(f)
|
||||||
|
|
||||||
|
config['probod']['custom-domains']['acme']['root-ca'] = root_ca
|
||||||
|
|
||||||
|
with open('e2e/console/testdata/config.yaml', 'w') as f:
|
||||||
|
yaml.dump(config, f, default_flow_style=False, allow_unicode=True)
|
||||||
|
EOF
|
||||||
|
- run: "make test-e2e"
|
||||||
|
env:
|
||||||
|
PROBO_E2E_VERBOSE: "true"
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ coverage-combined: coverage-report test-e2e-coverage ## Generate combined covera
|
|||||||
$(GO) tool cover -html=coverage-combined.out -o=coverage-combined.html
|
$(GO) tool cover -html=coverage-combined.out -o=coverage-combined.html
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: @probo/emails @probo/console @probo/trust bin/probod
|
build: bin/probod
|
||||||
|
|
||||||
.PHONY: sbom-docker
|
.PHONY: sbom-docker
|
||||||
sbom-docker: docker-build
|
sbom-docker: docker-build
|
||||||
@@ -145,6 +145,8 @@ bin/probod: pkg/server/api/console/v1/schema/schema.go \
|
|||||||
pkg/server/api/mcp/v1/server/server.go \
|
pkg/server/api/mcp/v1/server/server.go \
|
||||||
pkg/server/api/mcp/v1/types/types.go \
|
pkg/server/api/mcp/v1/types/types.go \
|
||||||
@probo/emails \
|
@probo/emails \
|
||||||
|
@probo/console \
|
||||||
|
@probo/trust \
|
||||||
vet
|
vet
|
||||||
$(GO_BUILD) -o $(PROBOD_BIN) $(PROBOD_SRC)
|
$(GO_BUILD) -o $(PROBOD_BIN) $(PROBOD_SRC)
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,12 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: "postgres"
|
POSTGRES_USER: "postgres"
|
||||||
POSTGRES_PASSWORD: "postgres"
|
POSTGRES_PASSWORD: "postgres"
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
minio:
|
minio:
|
||||||
image: "quay.io/minio/minio"
|
image: "quay.io/minio/minio"
|
||||||
entrypoint: "sh"
|
entrypoint: "sh"
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
//
|
//
|
||||||
// Optional environment variables:
|
// Optional environment variables:
|
||||||
// - PROBO_E2E_COVERDIR: Directory for coverage data (enables coverage collection)
|
// - PROBO_E2E_COVERDIR: Directory for coverage data (enables coverage collection)
|
||||||
|
// - PROBO_E2E_VERBOSE: If set, outputs binary stdout/stderr for debugging
|
||||||
//
|
//
|
||||||
// Example usage:
|
// Example usage:
|
||||||
//
|
//
|
||||||
@@ -114,8 +115,13 @@ func Setup() {
|
|||||||
} else {
|
} else {
|
||||||
cmd.Env = os.Environ()
|
cmd.Env = os.Environ()
|
||||||
}
|
}
|
||||||
cmd.Stdout = io.Discard
|
if os.Getenv("PROBO_E2E_VERBOSE") != "" {
|
||||||
cmd.Stderr = io.Discard
|
cmd.Stdout = os.Stdout
|
||||||
|
cmd.Stderr = os.Stderr
|
||||||
|
} else {
|
||||||
|
cmd.Stdout = io.Discard
|
||||||
|
cmd.Stderr = io.Discard
|
||||||
|
}
|
||||||
|
|
||||||
testEnv.cmd = cmd
|
testEnv.cmd = cmd
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user