Skip to content

Commit 37798e5

Browse files
author
Manuel Ruck
committed
feat: add linting workflow for code quality checks
Signed-off-by: Manuel Ruck <[email protected]>
1 parent 8fc1068 commit 37798e5

File tree

2 files changed

+63
-4
lines changed

2 files changed

+63
-4
lines changed

β€Ž.github/workflows/e2e-tests.yamlβ€Ž

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ name: πŸ§ͺ E2E Tests
22

33
on:
44
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
5+
branches: [main]
86

97
env:
108
APP_VARIANT: internal
@@ -124,4 +122,4 @@ jobs:
124122
# name: maestro-${{ matrix.test }}-${{ matrix.platform }}
125123
# path: |
126124
# .maestro/test-results
127-
# .maestro/logs
125+
# .maestro/logs

β€Ž.github/workflows/lint.yamlβ€Ž

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: ✨ Code Quality Checks
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
# Set default permissions to read-only
10+
permissions:
11+
contents: read
12+
13+
env:
14+
CI: true
15+
16+
jobs:
17+
lint:
18+
name: 🧹 Code Linting
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: πŸ›ŽοΈ Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: 🌟 Set up Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: "22"
29+
cache: "yarn"
30+
31+
- name: πŸ“¦ Cache Yarn dependencies
32+
uses: actions/cache@v4
33+
with:
34+
path: node_modules
35+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-yarn-
38+
39+
- name: 🧢 Install dependencies
40+
run: yarn install --frozen-lockfile
41+
42+
- name: πŸ” Run ESLint
43+
run: yarn lint
44+
45+
- name: πŸ† Run TypeScript checks
46+
run: yarn lint:ts
47+
48+
results:
49+
name: πŸŽ‰ Lint Results
50+
runs-on: ubuntu-latest
51+
needs: lint
52+
if: always()
53+
54+
steps:
55+
- name: 🎯 Check Lint Status
56+
if: needs.lint.result != 'success'
57+
run: exit 1
58+
59+
- name: πŸš€ All checks passed!
60+
if: needs.lint.result == 'success'
61+
run: echo "βœ… All lint checks passed successfully! 🎊"

0 commit comments

Comments
Β (0)