Skip to content

Commit 4f86ef9

Browse files
committed
chore: make use ofprofiles in docker-compose.yml
1 parent 6c9554a commit 4f86ef9

File tree

2 files changed

+25
-7
lines changed

2 files changed

+25
-7
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,20 @@ fixed unmoving content usually looks and reads the best.
9595
composer install
9696
```
9797

98-
1. For running tests:
98+
3. Start the development environment:
9999

100100
```bash
101-
docker compose up wordpress-test
101+
# Start development environment (WordPress + MySQL)
102+
docker compose --profile dev up
103+
104+
# The development site will be available at http://localhost:8000
105+
```
106+
107+
4. For running tests:
108+
109+
```bash
110+
# Start test environment
111+
docker compose --profile test up wordpress-test
102112
```
103113

104114
### Release Process
@@ -115,14 +125,14 @@ docker compose up wordpress-test
115125
* List all changes with proper categorization (Major/Feature/Fix)
116126
* Include any breaking changes, new features, and bug fixes
117127

118-
1. Test the changes locally:
128+
2. Test the changes locally:
119129

120130
```bash
121131
# Run the test suite
122132
docker compose run --rm wordpress-test composer test
123133
```
124134

125-
1. Build and verify the release locally:
135+
3. Build and verify the release locally:
126136

127137
```bash
128138
# Clean install dependencies without dev packages
@@ -134,15 +144,15 @@ composer install --no-dev --optimize-autoloader
134144
# Verify the build output in build/screenly-cast/
135145
```
136146

137-
1. Commit changes and push to GitHub:
147+
4. Commit changes and push to GitHub:
138148

139149
```bash
140150
git add .
141151
git commit -m "Prepare release vX.Y.Z"
142152
git push origin master
143153
```
144154

145-
1. Create and push a new tag:
155+
5. Create and push a new tag:
146156

147157
```bash
148158
# Create a new tag
@@ -156,7 +166,7 @@ git tag -d vX.Y.Z # Delete local tag
156166
git push --delete origin vX.Y.Z # Delete remote tag
157167
```
158168

159-
1. The GitHub Actions workflow will automatically:
169+
6. The GitHub Actions workflow will automatically:
160170
* Run tests across supported PHP versions
161171
* Build the release package without dev dependencies
162172
* If tests pass, deploy to WordPress.org plugin repository

docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ services:
1818
depends_on:
1919
db:
2020
condition: service_healthy
21+
profiles:
22+
- dev
2123

2224
db:
2325
image: mysql:8.0.32
@@ -37,6 +39,8 @@ services:
3739
interval: 5s
3840
timeout: 5s
3941
retries: 10
42+
profiles:
43+
- dev
4044

4145
# Test environment with configurable PHP version
4246
wordpress-test:
@@ -54,6 +58,8 @@ services:
5458
depends_on:
5559
db-test:
5660
condition: service_healthy
61+
profiles:
62+
- test
5763

5864
db-test:
5965
image: mysql:8.0.32
@@ -71,6 +77,8 @@ services:
7177
interval: 5s
7278
timeout: 5s
7379
retries: 10
80+
profiles:
81+
- test
7482

7583
# Linting environment
7684
lint:

0 commit comments

Comments
 (0)