From be033071a468e5d1ef90106ef9b846784c16b6a6 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sun, 24 Mar 2024 10:51:02 +0100 Subject: [PATCH] actions: services: cover the case when no container is specified When the container for running the steps is specificied, it is setup differently than when it is implicit. This test adds coverage for both instead of running all examples with an explicitly specified container image. --- .../.forgejo/workflows/test.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/actions/example-service/.forgejo/workflows/test.yml b/actions/example-service/.forgejo/workflows/test.yml index 438203c..014653a 100644 --- a/actions/example-service/.forgejo/workflows/test.yml +++ b/actions/example-service/.forgejo/workflows/test.yml @@ -2,7 +2,23 @@ on: [push] jobs: # - # No volume involved + # No volume involved & the container is implicit + # + simple-no-container: + runs-on: docker + services: + pgsql: + image: code.forgejo.org/oci/postgres:15 + env: + POSTGRES_DB: test + POSTGRES_PASSWORD: postgres + steps: + - run: | + apt-get update -qq + apt-get install -y -qq postgresql-client + PGPASSWORD=postgres psql -h pgsql -U postgres -c '\dt' test + # + # No volume involved & the container is explicit # simple: runs-on: docker