Skip to content

Commit b39970c

Browse files
authored
Merge pull request #8 from dragosv/release
Release
2 parents 83501a2 + 187af38 commit b39970c

3 files changed

Lines changed: 180 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
test:
13+
name: "Test before release"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Perl
20+
uses: shogo82148/actions-setup-perl@v1
21+
with:
22+
perl-version: "5.42"
23+
24+
- name: Verify Docker is available
25+
run: |
26+
docker version
27+
docker info
28+
29+
- name: Install dependencies
30+
run: |
31+
cpanm --installdeps .
32+
cpanm --notest HTTP::Tiny
33+
34+
- name: Build
35+
run: perl Build.PL && ./Build
36+
37+
- name: Run unit tests
38+
run: prove -lv t/01-load.t t/02-container-request.t t/03-wait-strategies.t t/06-basic.t t/07-system.t t/08-version.t t/09-containers.t t/10-images.t t/11-networks.t t/12-volumes.t
39+
40+
- name: Pre-pull Docker images
41+
run: |
42+
docker pull nginx:alpine &
43+
docker pull postgres:16-alpine &
44+
docker pull redis:7-alpine &
45+
wait
46+
47+
- name: Run integration tests
48+
env:
49+
TESTCONTAINERS_LIVE: "1"
50+
run: prove -lv t/04-integration.t t/05-modules.t
51+
52+
- name: Clean up containers
53+
if: always()
54+
run: |
55+
docker ps -a --filter "label=org.testcontainers" -q | xargs -r docker rm -f
56+
docker system prune -f
57+
58+
build-dist:
59+
name: Build distribution
60+
needs: [test]
61+
runs-on: ubuntu-latest
62+
steps:
63+
- name: Check out code
64+
uses: actions/checkout@v4
65+
66+
- name: Setup Perl
67+
uses: shogo82148/actions-setup-perl@v1
68+
with:
69+
perl-version: "5.42"
70+
71+
- name: Install dependencies
72+
run: cpanm --installdeps .
73+
74+
- name: Build distribution
75+
run: |
76+
perl Build.PL
77+
./Build manifest
78+
./Build dist
79+
80+
- name: Verify tarball
81+
run: |
82+
ls -la Testcontainers-*.tar.gz
83+
tar tzf Testcontainers-*.tar.gz | head -20
84+
85+
- name: Upload distribution artifact
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: cpan-dist
89+
path: Testcontainers-*.tar.gz
90+
91+
github-release:
92+
name: Create GitHub Release
93+
needs: [build-dist]
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Check out code
97+
uses: actions/checkout@v4
98+
with:
99+
fetch-depth: 0
100+
101+
- name: Download distribution artifact
102+
uses: actions/download-artifact@v4
103+
with:
104+
name: cpan-dist
105+
106+
- name: Extract version from tag
107+
id: version
108+
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
109+
110+
- name: Create GitHub Release
111+
uses: softprops/action-gh-release@v2
112+
with:
113+
generate_release_notes: true
114+
files: Testcontainers-*.tar.gz
115+
body: |
116+
## Installation
117+
118+
```bash
119+
cpanm --installdeps .
120+
perl Build.PL && ./Build && ./Build install
121+
```
122+
123+
See [QUICKSTART.md](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/QUICKSTART.md) for usage guide.
124+
125+
publish-cpan:
126+
name: Publish to CPAN
127+
needs: [build-dist]
128+
runs-on: ubuntu-latest
129+
environment: cpan
130+
steps:
131+
- name: Setup Perl
132+
uses: shogo82148/actions-setup-perl@v1
133+
with:
134+
perl-version: "5.42"
135+
136+
- name: Download distribution artifact
137+
uses: actions/download-artifact@v4
138+
with:
139+
name: cpan-dist
140+
141+
- name: Install CPAN upload tool
142+
run: cpanm --notest CPAN::Uploader
143+
144+
- name: Upload to CPAN
145+
env:
146+
CPAN_USERNAME: ${{ secrets.CPAN_USERNAME }}
147+
CPAN_PASSWORD: ${{ secrets.CPAN_PASSWORD }}
148+
run: cpan-upload --user "$CPAN_USERNAME" --password "$CPAN_PASSWORD" Testcontainers-*.tar.gz

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
# Testcontainers for Perl 5
77

88
Perl 5 implementation of [Testcontainers](https://testcontainers.com/), inspired by the
9-
[Go reference implementation](https://golang.testcontainers.org/). Incrorporates the work from
10-
[WWW::Docker](https://github.com/Getty/p5-www-docker) as the Docker client, as it is mot maintained.
9+
[Go reference implementation](https://golang.testcontainers.org/).
1110

1211
Testcontainers makes it simple to create and clean up container-based
1312
dependencies for automated integration/smoke tests.
@@ -278,3 +277,7 @@ This software is copyright (c) 2026 by Testcontainers Contributors.
278277

279278
This is free software; you can redistribute it and/or modify it under
280279
the same terms as the Perl 5 programming language system itself.
280+
281+
## Acknowledgments
282+
283+
This project includes code derived from [WWW::Docker](https://github.com/Getty/p5-www-docker) by [Torsten Raudssus](https://github.com/getty), licensed under Perl license.

pr-summary.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# PR: Add Acknowledgments section to README
2+
3+
## Summary
4+
5+
Add an Acknowledgments section to `README.md` crediting the vendored [WWW::Docker](https://github.com/Getty/p5-www-docker) library and its author [Torsten Raudssus](https://github.com/getty). Also cleans up the intro paragraph by removing an inline note about WWW::Docker being unmaintained (that detail is better suited to the acknowledgments).
6+
7+
## Changes
8+
9+
### Modified files
10+
11+
| File | Description |
12+
|------|-------------|
13+
| `README.md` | Added `## Acknowledgments` section at the end; simplified the intro paragraph to remove the inline WWW::Docker maintenance note |
14+
15+
## Diff
16+
17+
```diff
18+
Perl 5 implementation of Testcontainers, inspired by the
19+
-Go reference implementation. Incrorporates the work from
20+
-WWW::Docker as the Docker client, as it is mot maintained.
21+
+Go reference implementation.
22+
23+
+## Acknowledgments
24+
+
25+
+This project includes code derived from WWW::Docker by Torsten Raudssus,
26+
+licensed under Perl license.
27+
```

0 commit comments

Comments
 (0)