Skip to content

Commit 1fd3e2b

Browse files
committed
feat: add release script and dependencies for markdown linting and release management
2 parents 71f7aaf + 3e3d4ea commit 1fd3e2b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+6801
-46758
lines changed

.all-contributorsrc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,28 @@
4343
"code",
4444
"maintenance"
4545
]
46+
},
47+
{
48+
"login": "mend-bolt-for-github[bot]",
49+
"name": "mend-bolt-for-github[bot]",
50+
"avatar_url": "https://avatars.githubusercontent.com/in/16809?v=4",
51+
"profile": "https://github.com/apps/mend-bolt-for-github",
52+
"contributions": [
53+
"bug",
54+
"code",
55+
"maintenance"
56+
]
57+
},
58+
{
59+
"login": "lgtm-com[bot]",
60+
"name": "lgtm-com[bot]",
61+
"avatar_url": "https://avatars.githubusercontent.com/in/17324?v=4",
62+
"profile": "https://github.com/apps/lgtm-com",
63+
"contributions": [
64+
"bug",
65+
"code",
66+
"maintenance"
67+
]
4668
}
4769
]
4870
}

.env.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
STACK=angular
22
FOLDERPHAR=apps
3-
FOLDERLAMPY=lampy
4-
DOCKERCOMPOSEFILES=docker-compose.yml docker-compose-lampy.yml
3+
DOCKERCOMPOSEFILE=docker-compose-lampy.yml

.github/workflows/ci.yml

Lines changed: 133 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,143 @@
1-
name: ci
2-
on: [push]
1+
name: CI/CD Pipeline
2+
on:
3+
push:
4+
branches: [main, develop]
5+
pull_request:
6+
branches: [main, develop]
7+
38
jobs:
4-
tests:
5-
runs-on: ${{ matrix.operating-system }}
6-
strategy:
7-
fail-fast: false
8-
matrix:
9-
operating-system: [ubuntu-20.04]
9+
lint:
10+
runs-on: ubuntu-24.04
11+
timeout-minutes: 60
12+
env:
13+
DOCKER_INTERACTIVE: false
1014
steps:
15+
# === SETUP PHASE ===
1116
- name: Checkout
12-
uses: actions/checkout@v3
17+
uses: actions/checkout@v5
1318
with:
1419
submodules: recursive
20+
21+
- name: Setup Docker Compose
22+
uses: docker/setup-compose-action@v1
23+
24+
- name: Setup Task
25+
uses: go-task/setup-task@v1
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v6
29+
with:
30+
node-version-file: '.nvmrc'
31+
cache: 'npm'
32+
cache-dependency-path: 'package-lock.json'
33+
34+
- name: Setup cache
35+
uses: actions/cache@v4
36+
with:
37+
path: node_modules
38+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
39+
restore-keys: ${{ runner.os }}-node-
40+
41+
- name: Install dependencies
42+
run: |
43+
if [ ! -d node_modules ]; then
44+
npm install
45+
fi
46+
47+
- name: Setup environment files
48+
run: |
49+
cp .env.example .env
50+
51+
- name: lint all
52+
run: task lint:all
53+
54+
launch:
55+
runs-on: ubuntu-24.04
56+
timeout-minutes: 60
57+
env:
58+
DOCKER_INTERACTIVE: false
59+
steps:
60+
# === SETUP PHASE ===
61+
- name: Checkout
62+
uses: actions/checkout@v5
63+
with:
64+
submodules: recursive
65+
66+
- name: Setup Docker Compose
67+
uses: docker/setup-compose-action@v1
68+
69+
- name: Setup Task
70+
uses: go-task/setup-task@v1
71+
72+
- name: Setup Node.js
73+
uses: actions/setup-node@v6
74+
with:
75+
node-version-file: '.nvmrc'
76+
cache: 'npm'
77+
cache-dependency-path: 'package-lock.json'
78+
1579
- name: Repository lampy
16-
uses: actions/checkout@v3
80+
uses: actions/checkout@v5
1781
with:
1882
submodules: recursive
19-
ref: 'v2.0'
2083
repository: koromerzhin/lampy
84+
ref: '4.3'
2185
path: lampy
22-
- name: Install npm dependencies
23-
run: npm install
24-
- name: 'set .env'
25-
run: 'cp .env.example .env'
26-
- name: 'Launch Lampy'
27-
run: cd lampy && npm run exec
28-
- name: 'Image pull'
29-
run: npm run docker:getpull-image
30-
- name: 'Build containers'
31-
run: npm run docker:deploy
32-
- name: 'Waiting'
33-
run: npm run docker:waiting
34-
- name: linter readme.md
35-
run: npm run lint:markdown
86+
87+
- name: Setup cache
88+
uses: actions/cache@v4
89+
with:
90+
path: node_modules
91+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
92+
restore-keys: ${{ runner.os }}-node-
93+
94+
- name: Install dependencies
95+
run: |
96+
if [ ! -d node_modules ]; then
97+
npm install
98+
fi
99+
100+
- name: Setup environment files
101+
run: |
102+
cp .env.example .env
103+
104+
- name: Setup database and infrastructure
105+
run: |
106+
cd lampy && task lampy:exec
107+
108+
- name: Deploy containers
109+
run: |
110+
task angular:exec
111+
112+
- name: Run Cypress tests
113+
uses: cypress-io/github-action@v6
114+
continue-on-error: true
115+
with:
116+
wait-on-timeout: 120
117+
browser: chrome
118+
record: false
119+
parallel: false
120+
config: 'screenshotOnRunFailure=true,video=true,videoCompression=32,defaultCommandTimeout=10000,requestTimeout=10000,responseTimeout=10000,retries={"runMode":2,"openMode":0}'
121+
env:
122+
CYPRESS_CACHE_FOLDER: ~/.cache/Cypress
123+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
124+
125+
- name: Docker stack stop
126+
if: always()
127+
run: |
128+
docker stack rm angular
129+
docker stack rm lampy
130+
131+
# === ARTIFACTS PHASE ===
132+
- name: Archive test results
133+
uses: actions/upload-artifact@v4
134+
if: always()
135+
with:
136+
name: "test-results-${{ github.run_number }}-${{ github.sha }}"
137+
path: |
138+
cypress/screenshots
139+
cypress/videos
140+
cypress/reports
141+
retention-days: 7
142+
if-no-files-found: ignore
143+
compression-level: 6

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
2-
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
3-
# composer.lock
4-
node_modules
5-
apps/node_modules/
6-
apps/dist
1+
/node_modules
2+
/apps
3+
.env
4+
docker-compose-*.yml
5+
!docker-compose-lampy.yml
6+
install/apps

.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 = [email protected]:koromerzhin/taskfiles.git

.nvmrc

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

.release-it.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"git": {
3+
"requireBranch": "main",
4+
"commitMessage": "chore: release v${version}"
5+
},
6+
"$schema": "https://unpkg.com/release-it/schema/release-it.json",
7+
"github": {
8+
"release": true
9+
},
10+
"hooks": {
11+
"before:init": ["git pull", "task lint:all"],
12+
"after:bump": "npx auto-changelog -p"
13+
}
14+
}

.whitesource

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"scanSettings": {
3+
"baseBranches": []
4+
},
5+
"checkRunSettings": {
6+
"vulnerableCheckRunConclusionLevel": "failure",
7+
"displayMode": "diff",
8+
"useMendCheckNames": true
9+
},
10+
"issueSettings": {
11+
"minSeverityLevel": "LOW",
12+
"issueType": "DEPENDENCY"
13+
}
14+
}

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
![Version](https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000)
44
![Documentation](https://img.shields.io/badge/documentation-yes-brightgreen.svg)
55
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/hackariens/angular/graphs/commit-activity)
6-
![Continuous Integration](https://github.com/hackariens/angular/workflows/ci/badge.svg?branch=develop)
6+
![Continuous Integration](https://github.com/hackariens/angular/actions/workflows/ci.yml/badge.svg?branch=develop)
77

88
> Templates pour la création d'un nouveau projet angular
99
1010
## 🏠 [Homepage](https://github.com/hackariens/angular#readme)
1111

1212
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
13-
![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)
13+
![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)
1414
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1515

1616
## Need
1717

1818
Software:
1919

20-
- npm
21-
- docker
22-
- repository koromerzhin/lampy
20+
- [task](https://taskfile.dev/)
21+
- [nodejs](https://nodejs.org/)
22+
- [lampy](https://github.com/koromerzhin/lampy)
2323

2424
Config:
2525

@@ -32,24 +32,24 @@ Hosts:
3232
## Download
3333

3434
```sh
35-
git clone --recurse-submodules [email protected]:hackariens/angular.git angular
35+
git clone --recursive [email protected]:hackariens/angular.git angular
3636
cd angular
3737
```
3838

3939
## Environnment
4040

4141
Edit .env with .env.example
4242

43-
## Install
43+
## Create apps
4444

45-
``` sh
46-
npm install
45+
```sh
46+
task create:apps
4747
```
4848

4949
## Launch
5050

5151
``` sh
52-
npm run exec
52+
task angular:exec
5353
```
5454

5555
## Author
@@ -94,6 +94,8 @@ Thanks goes to these wonderful people
9494
<td align="center" valign="top" width="14.28%"><a href="https://github.com/koromerzhin"><img src="https://avatars0.githubusercontent.com/u/308012?v=4" width="100px;" alt=""/><br /><sub><b>Le TOULLEC Martial</b></sub></a></td>
9595
<td align="center" valign="top" width="14.28%"><a href="https://github.com/apps/renovate"><img src="https://avatars.githubusercontent.com/in/2740?v=4" width="100px;" alt=""/><br /><sub><b>renovate[bot]</b></sub></a></td>
9696
<td align="center" valign="top" width="14.28%"><a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4" width="100px;" alt=""/><br /><sub><b>dependabot[bot]</b></sub></a></td>
97+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/apps/mend-bolt-for-github"><img src="https://avatars.githubusercontent.com/in/16809?v=4" width="100px;" alt=""/><br /><sub><b>mend-bolt-for-github[bot]</b></sub></a></td>
98+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/apps/lgtm-com"><img src="https://avatars.githubusercontent.com/in/17324?v=4" width="100px;" alt=""/><br /><sub><b>lgtm-com[bot]</b></sub></a></td>
9799
</tr>
98100
</tbody>
99101
</table>

0 commit comments

Comments
 (0)