From 7243566bcefce9c3d25a349f57b2e0df910dfd1e Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 7 Oct 2023 23:51:05 +0200 Subject: [PATCH] example-service: only one workflow to avoid breakage --- .../.forgejo/workflows/postgresql.yml | 19 ----------------- .../workflows/{volume.yml => test.yml} | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 19 deletions(-) delete mode 100644 testdata/example-service/.forgejo/workflows/postgresql.yml rename testdata/example-service/.forgejo/workflows/{volume.yml => test.yml} (71%) diff --git a/testdata/example-service/.forgejo/workflows/postgresql.yml b/testdata/example-service/.forgejo/workflows/postgresql.yml deleted file mode 100644 index 9d9d30e..0000000 --- a/testdata/example-service/.forgejo/workflows/postgresql.yml +++ /dev/null @@ -1,19 +0,0 @@ -on: [push] - -jobs: - test: - runs-on: docker - container: - image: code.forgejo.org/oci/debian:bookworm - - 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 diff --git a/testdata/example-service/.forgejo/workflows/volume.yml b/testdata/example-service/.forgejo/workflows/test.yml similarity index 71% rename from testdata/example-service/.forgejo/workflows/volume.yml rename to testdata/example-service/.forgejo/workflows/test.yml index 0649f50..438203c 100644 --- a/testdata/example-service/.forgejo/workflows/volume.yml +++ b/testdata/example-service/.forgejo/workflows/test.yml @@ -2,9 +2,29 @@ on: [push] jobs: # + # No volume involved + # + simple: + runs-on: docker + container: + image: code.forgejo.org/oci/debian:bookworm + + 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 + # # A --volume option will expose the volume from the docker host to the job # volume-on-step: + needs: [simple] runs-on: docker container: image: code.forgejo.org/oci/debian:bookworm @@ -19,6 +39,7 @@ jobs: # A --volume option will expose the volume from the docker host to the service # volume-on-service: + needs: [volume-on-step] runs-on: docker container: image: code.forgejo.org/oci/debian:bookworm