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.
This commit is contained in:
Earl Warren 2024-03-24 10:51:02 +01:00
parent 4f3e03b917
commit be033071a4
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -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