Skip to content

Commit 26312c1

Browse files
committed
github ci/cd
1 parent cb89514 commit 26312c1

File tree

2 files changed

+35
-13
lines changed

2 files changed

+35
-13
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: CI
1+
name: CI Main (Strict)
22

33
on:
44
push:
55
branches:
66
- main
7-
pull_request:
87

98
permissions:
109
actions: read
@@ -16,26 +15,18 @@ jobs:
1615
steps:
1716
- uses: actions/checkout@v4
1817
with:
19-
filter: tree:0
2018
fetch-depth: 0
2119

22-
# This enables task distribution via Nx Cloud
23-
# Run this command as early as possible, before dependencies are installed
24-
# Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
25-
# Uncomment this line to enable task distribution
26-
# - run: npx nx start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build"
27-
28-
# Cache node_modules
2920
- uses: actions/setup-node@v4
3021
with:
3122
node-version: 20
3223
cache: 'npm'
3324

3425
- run: npm ci --legacy-peer-deps
3526

36-
# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
37-
# - run: npx nx-cloud record -- echo Hello World
27+
# Vérifie TOUT : lint + test + build
3828
- run: npx nx run-many -t lint test build
39-
# Nx Cloud recommends fixes for failures to help you get CI green faster. Learn more: https://nx.dev/ci/features/self-healing-ci
29+
30+
# Fix CI si échec
4031
- run: npx nx fix-ci
4132
if: always()

.github/workflows/pr.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI Pull Request (Souple)
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
actions: read
8+
contents: read
9+
10+
jobs:
11+
pr:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: 'npm'
22+
23+
- run: npm ci --legacy-peer-deps
24+
25+
# Vérifie SEULEMENT que ça compile (pas lint ni test)
26+
- run: npx nx affected -t build --base=origin/main
27+
28+
# Fix CI si échec
29+
- run: npx nx fix-ci
30+
if: always()
31+

0 commit comments

Comments
 (0)