From 4676f507381b8c62d66dd654dffed8910936c798 Mon Sep 17 00:00:00 2001 From: Peter Baranyi Date: Fri, 26 Jul 2024 22:42:14 +0200 Subject: [PATCH 1/6] Add Github actions --- .github/workflows/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/workflows/action.yml diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml new file mode 100644 index 0000000..47b94cd --- /dev/null +++ b/.github/workflows/action.yml @@ -0,0 +1,9 @@ +steps: + - uses: actions/checkout@v4 + - uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: "5.32" + install-modules-with: cpanm + install-modules-args: --with-develop --with-configure --installdeps --skip-satisfied + + - run: prove -lv t From 690b57a39e4335683baccea97599e6b86a06c21a Mon Sep 17 00:00:00 2001 From: Peter Baranyi Date: Fri, 26 Jul 2024 22:59:01 +0200 Subject: [PATCH 2/6] Github actions --- .github/workflows/action.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 47b94cd..6662243 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,9 +1,20 @@ -steps: - - uses: actions/checkout@v4 - - uses: shogo82148/actions-setup-perl@v1 - with: - perl-version: "5.32" - install-modules-with: cpanm - install-modules-args: --with-develop --with-configure --installdeps --skip-satisfied +name: Mailnesia Perl unittests - - run: prove -lv t +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: "5.32" + install-modules-with: cpanm + install-modules-args: --with-develop --with-configure --installdeps --skip-satisfied + + - run: prove -lv t From 14cf7f9eeb4d0851d7fb9cb2eee1004e49725d16 Mon Sep 17 00:00:00 2001 From: Peter Baranyi Date: Fri, 26 Jul 2024 23:16:37 +0200 Subject: [PATCH 3/6] Github actions 3.0 --- .github/workflows/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 6662243..daabb8d 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -17,4 +17,5 @@ jobs: install-modules-with: cpanm install-modules-args: --with-develop --with-configure --installdeps --skip-satisfied + - run: perl -v - run: prove -lv t From 5450446f52d5e75fe67fe98990f2c4a31a7fa514 Mon Sep 17 00:00:00 2001 From: Peter Baranyi Date: Fri, 26 Jul 2024 23:32:40 +0200 Subject: [PATCH 4/6] Github actions part 4 --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index daabb8d..7d3d118 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -15,7 +15,7 @@ jobs: with: perl-version: "5.32" install-modules-with: cpanm - install-modules-args: --with-develop --with-configure --installdeps --skip-satisfied + install-modules-args: --installdeps . --skip-satisfied - run: perl -v - run: prove -lv t From 66e2792ffd1ea735c9542904da9e88438771d765 Mon Sep 17 00:00:00 2001 From: Peter Baranyi Date: Fri, 26 Jul 2024 23:47:55 +0200 Subject: [PATCH 5/6] GA5 --- .github/workflows/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 7d3d118..86da4d3 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -14,8 +14,8 @@ jobs: - uses: shogo82148/actions-setup-perl@v1 with: perl-version: "5.32" - install-modules-with: cpanm - install-modules-args: --installdeps . --skip-satisfied + - run: pwd + - run: cpanm --installdeps . --skip-satisfied - run: perl -v - run: prove -lv t From e8a7fb97e142d255832190c9c96fffd12561d298 Mon Sep 17 00:00:00 2001 From: Peter Baranyi Date: Mon, 8 Dec 2025 00:36:02 +0100 Subject: [PATCH 6/6] add Redis&Psql services to the testing workflow --- .github/workflows/action.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 86da4d3..5d0d6ce 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -2,9 +2,9 @@ name: Mailnesia Perl unittests on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: build: @@ -19,3 +19,30 @@ jobs: - run: cpanm --installdeps . --skip-satisfied - run: perl -v - run: prove -lv t + + # Service containers to start + services: + # Label used to access the service container + redis: + # Docker Hub image + image: redis + # + ports: + # Opens tcp port 6379 on the host and service container + - 6379:6379 + + postgres: + # Docker Hub image + image: postgres + # Provide the password for postgres + env: + POSTGRES_PASSWORD: postgres + # Set health checks to wait until postgres has started + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + # Maps tcp port 5432 on service container to the host + - 5432:5432