Skip to content

Commit 6c9567c

Browse files
committed
chore: remove outdated npm scripts and update dependencies
- Removed various npm scripts related to Docker and Composer from package.json. - Added new development dependencies including tools for changelog generation, testing, and code quality. - Introduced a new taskfiles directory with a subproject commit.
1 parent e38cc69 commit 6c9567c

File tree

12 files changed

+10867
-4597
lines changed

12 files changed

+10867
-4597
lines changed

.env.example

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
STACK=wordpress
22
FOLDERPHAR=apps
3-
FILESQL=database_init/01_wordpress.sql
4-
FOLDERLAMPY=lampy
5-
DOCKERCOMPOSEFILES=docker-compose.yml docker-compose-lampy.yml
3+
FOLDERSQL=database_init
4+
FILESQL=01_wordpress.sql
5+
FOLDERLAMPY=./lampy
6+
SERVERNAME=wordpress.traefik.me
7+
DOCKERCOMPOSEFILE=docker-compose-lampy.yml

.github/workflows/ci.yml

Lines changed: 96 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,114 @@
1-
name: ci
2-
on: [push]
1+
name: CI Pipeline
2+
on:
3+
push:
4+
paths-ignore:
5+
- '**.md'
6+
- 'docs/**'
7+
- '.gitignore'
8+
pull_request:
9+
paths-ignore:
10+
- '**.md'
11+
- 'docs/**'
12+
- '.gitignore'
13+
14+
env:
15+
NODE_VERSION: '22'
16+
DOCKER_COMPOSE_VERSION: '2.29.7'
17+
PHP_VERSION: '8.3'
18+
319
jobs:
4-
tests:
20+
ci:
521
runs-on: ubuntu-24.04
22+
timeout-minutes: 60
23+
env:
24+
DOCKER_INTERACTIVE: false
625
steps:
26+
# === SETUP PHASE ===
727
- name: Checkout
828
uses: actions/checkout@v4
929
with:
1030
submodules: recursive
31+
32+
- name: Setup Docker Compose
33+
run: |
34+
if ! command -v docker-compose &> /dev/null; then
35+
sudo curl -L "https://github.com/docker/compose/releases/download/v${{ env.DOCKER_COMPOSE_VERSION }}/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose
36+
sudo chmod +x /usr/local/bin/docker-compose
37+
fi
38+
docker-compose --version
39+
40+
- name: Setup Task
41+
uses: go-task/setup-task@v1
42+
43+
- name: Setup Node.js
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: ${{ env.NODE_VERSION }}
47+
cache: 'npm'
48+
cache-dependency-path: 'package-lock.json'
49+
1150
- name: Repository lampy
1251
uses: actions/checkout@v4
1352
with:
1453
submodules: recursive
15-
ref: 'v2.0'
1654
repository: koromerzhin/lampy
55+
ref: 'v4.0'
1756
path: lampy
18-
- name: Install npm dependencies
19-
run: npm install
20-
- name: 'set .env'
21-
run: 'cp .env.example .env'
22-
- name: 'SET BDD'
23-
run: npm run bdd:mariadb
24-
- name: 'Launch Lampy'
25-
run: cd lampy && npm run exec
26-
- name: 'Image pull'
27-
run: npm run docker:getpull-image
28-
- name: 'create apps'
29-
run: npm run create:apps
30-
- name: 'env wordpress'
31-
run: cp .env.wordpress apps/.env
32-
- name: 'Build containers'
33-
run: npm run docker:deploy
34-
- name: 'Waiting'
35-
run: npm run docker:waiting
36-
- name: 'docker ls'
37-
run: npm run docker:waiting
38-
- name: linter readme.md
39-
run: npm run lint:markdown
40-
- name: 'sleep 50'
41-
run: sleep 50
42-
- name: Cypress run
57+
58+
# === BUILD PHASE ===
59+
- name: Install dependencies
60+
run: npm ci --prefer-offline --no-audit
61+
62+
- name: Setup environment files
63+
run: |
64+
cp .env.example .env
65+
66+
# === INFRASTRUCTURE PHASE ===
67+
- name: Setup Docker cache
68+
uses: actions/cache@v4
69+
with:
70+
path: /tmp/.buildx-cache
71+
key: ${{ runner.os }}-buildx-${{ github.sha }}
72+
restore-keys: |
73+
${{ runner.os }}-buildx-
74+
75+
- name: Setup database and infrastructure
76+
run: |
77+
task wordpress:copysql
78+
cd lampy && task lampy:exec
79+
80+
- name: Deploy containers
81+
run: |
82+
task wordpress:getpull-image
83+
task wordpress:getapacheconf
84+
task create:apps
85+
task wordpress:install-first
86+
task wordpress:deploy
87+
task wordpress:waiting
88+
89+
- name: Run Cypress tests
4390
uses: cypress-io/github-action@v6
4491
continue-on-error: true
45-
- name: Set date and branch variables
46-
run: |
47-
echo "CURRENT_DATE=$(date '+%Y-%m-%d_%H-%M-%S')" >> $GITHUB_ENV
48-
echo "CURRENT_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
49-
- name: Archive screenshots
92+
with:
93+
wait-on-timeout: 120
94+
browser: chrome
95+
record: false
96+
parallel: false
97+
config: screenshotOnRunFailure=true,video=true,videoCompression=32,defaultCommandTimeout=10000,requestTimeout=10000,responseTimeout=10000,retries={"runMode":2,"openMode":0}
98+
env:
99+
CYPRESS_CACHE_FOLDER: ~/.cache/Cypress
100+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
101+
102+
# === ARTIFACTS PHASE ===
103+
- name: Archive test results
50104
uses: actions/upload-artifact@v4
105+
if: always()
51106
with:
52-
name: "wordpress-${{ env.CURRENT_BRANCH }}_${{ env.CURRENT_DATE }}"
53-
path: cypress/
107+
name: "test-results-${{ github.run_number }}-${{ github.sha }}"
108+
path: |
109+
cypress/screenshots
110+
cypress/videos
111+
cypress/reports
54112
retention-days: 7
113+
if-no-files-found: ignore
114+
compression-level: 6

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "taskfiles"]
2+
path = taskfiles
3+
url = git@github.com:koromerzhin/taskfiles.git

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22

0 commit comments

Comments
 (0)