Skip to content

Commit f2269c8

Browse files
authored
Merge pull request #47 from Pyrrha-Platform/updates
Updates
2 parents 5f77488 + 909571a commit f2269c8

File tree

2 files changed

+53
-12
lines changed

2 files changed

+53
-12
lines changed

.github/workflows/linter.yml

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,65 @@
1-
name: linter
1+
name: Node.js Linting
22

33
on:
4-
# Execute on every push to any branch
54
push:
6-
branches:
7-
- "**"
8-
# Execute on every pull request to the master branch
5+
branches: ["**"]
96
pull_request_target:
10-
branches:
11-
- main
7+
branches: [main]
128

139
jobs:
14-
linter:
10+
lint:
1511
runs-on: ubuntu-latest
1612
steps:
1713
- uses: actions/checkout@v4
1814

19-
- name: Set up node
15+
- name: Set up Node.js
2016
uses: actions/setup-node@v4
2117
with:
2218
node-version: '20'
23-
- run: npm install -g prettier@latest
24-
- run: prettier --check .
19+
cache: 'npm'
20+
21+
- name: Install dependencies
22+
run: |
23+
if [ -f package.json ]; then
24+
npm install
25+
else
26+
echo "No package.json found, installing global tools only"
27+
fi
28+
29+
# JavaScript/Node.js Linting
30+
- name: Install linting tools
31+
run: npm install -g prettier eslint dockerfilelint
32+
33+
- name: Format check with Prettier (using centralized config)
34+
run: |
35+
# Use centralized prettier config if available
36+
if [ -f "../Pyrrha-Development-Tools/configs/.prettierrc.js" ]; then
37+
npx prettier --config ../Pyrrha-Development-Tools/configs/.prettierrc.js --check "**/*.{js,json,md}"
38+
else
39+
npx prettier --check "**/*.{js,json,md}"
40+
fi
41+
42+
- name: Lint with ESLint (if configured)
43+
run: |
44+
if [ -f .eslintrc.* ] || [ -f eslint.config.* ]; then
45+
npx eslint . || echo "ESLint issues found (non-blocking)"
46+
else
47+
echo "No ESLint configuration found, skipping"
48+
fi
49+
50+
- name: Run tests (if available)
51+
run: |
52+
if [ -f package.json ] && npm run test --if-present; then
53+
npm test
54+
else
55+
echo "No tests configured, skipping"
56+
fi
57+
58+
# Dockerfile Linting
59+
- name: Dockerfile linting
60+
run: |
61+
if ls Dockerfile* 1> /dev/null 2>&1; then
62+
dockerfilelint Dockerfile*
63+
else
64+
echo "No Dockerfiles found, skipping"
65+
fi

src/content/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@
4949
"footerLink": "Call for Code® with The Linux Foundation project",
5050
"footer2": ".",
5151
"footerLink2": "",
52-
"copyright": "Copyright © 2021-2022 Pyrrha a Series of LF Projects, LLC.",
52+
"copyright": "Copyright © 2021-2025 Pyrrha a Series of LF Projects, LLC.",
5353
"copyrightInfo": "For trademark usage guidelines, privacy and cookie policies, and other applicable policies, as well as terms and conditions governing this web site, please see www.lfprojects.org."
5454
}

0 commit comments

Comments
 (0)