This commit is contained in:
+16
-9
@@ -14,6 +14,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: |
|
run: |
|
||||||
|
echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
|
||||||
|
echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
|
||||||
|
apk update
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
bash \
|
bash \
|
||||||
git \
|
git \
|
||||||
@@ -21,8 +24,6 @@ jobs:
|
|||||||
py3-pip \
|
py3-pip \
|
||||||
rust
|
rust
|
||||||
apk add --no-cache qt6-qtdeclarative-dev-tools || \
|
apk add --no-cache qt6-qtdeclarative-dev-tools || \
|
||||||
apk add --no-cache qt6-qtdeclarative-dev || \
|
|
||||||
apk add --no-cache qt6-qtdeclarative || \
|
|
||||||
echo "::warning::qmllint not available"
|
echo "::warning::qmllint not available"
|
||||||
|
|
||||||
- name: Python lint
|
- name: Python lint
|
||||||
@@ -36,23 +37,29 @@ jobs:
|
|||||||
|
|
||||||
- name: JS lint
|
- name: JS lint
|
||||||
run: |
|
run: |
|
||||||
if [ -f package.json ]; then
|
if [ -n "$(find . -name "*.js" -o -name "*.jsx" -o -name "*.ts" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -print -quit)" ]; then
|
||||||
npm install --no-audit --no-fund
|
if [ -f package.json ]; then
|
||||||
if ! npx eslint .; then
|
npm install --no-audit --no-fund
|
||||||
echo "::warning::eslint reported issues"
|
fi
|
||||||
|
if [ -f eslint.config.js ] || [ -f eslint.config.mjs ] || [ -f eslint.config.cjs ] || [ -f .eslintrc ] || [ -f .eslintrc.js ] || [ -f .eslintrc.cjs ] || [ -f .eslintrc.json ] || [ -f .eslintrc.yaml ] || [ -f .eslintrc.yml ]; then
|
||||||
|
if ! npx --yes eslint .; then
|
||||||
|
echo "::warning::eslint reported issues"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No eslint config found"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "No JS project found"
|
echo "No JS/TS files found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: JS format (prettier)
|
- name: JS format (prettier)
|
||||||
run: |
|
run: |
|
||||||
if [ -f package.json ]; then
|
if [ -n "$(find . -name "*.js" -o -name "*.jsx" -o -name "*.ts" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -print -quit)" ]; then
|
||||||
if ! npx --yes prettier --check "**/*.{js,jsx,ts,tsx,mjs,cjs}" --ignore-path .gitignore; then
|
if ! npx --yes prettier --check "**/*.{js,jsx,ts,tsx,mjs,cjs}" --ignore-path .gitignore; then
|
||||||
echo "::warning::prettier reported issues"
|
echo "::warning::prettier reported issues"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "No JS project found"
|
echo "No JS/TS files found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Rust lint
|
- name: Rust lint
|
||||||
|
|||||||
Reference in New Issue
Block a user