-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #668 from swrlab/dev/deps-linter
chore: update dependencies / refact: swap super-linter for repo-specific config
- Loading branch information
Showing
39 changed files
with
1,693 additions
and
680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
# set google login | ||
GCP_PROJECT_ID=my-project | ||
GOOGLE_APPLICATION_CREDENTIALS=./keys/gcp.json | ||
|
||
ARD_AUTH=user:pass | ||
ARD_DELIVER_API=https://deliver-test.ard.de/organization-service/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,192 +1,28 @@ | ||
name: Linter | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
install-all: | ||
description: 'Install dependencies using `install-all`' | ||
required: false | ||
type: boolean | ||
default: false | ||
use-bun: | ||
description: 'Use Bun instead of yarn' | ||
required: false | ||
type: boolean | ||
default: false | ||
generate-keys: | ||
description: 'Whether to run command for dummy key generation' | ||
required: false | ||
type: boolean | ||
default: false | ||
log-level: | ||
description: 'Which log level to use for `super-linter`' | ||
required: false | ||
type: string | ||
default: 'VERBOSE' | ||
validate-all-codebase: | ||
description: 'Whether to run validation on all files' | ||
required: false | ||
type: boolean | ||
default: true | ||
javascript-es-config-file: | ||
description: 'Path to the ESLint configuration file' | ||
required: false | ||
type: string | ||
default: '/eslint.config.mjs' | ||
|
||
env: | ||
CSS_FILE_NAME: /.stylelintrc.json | ||
DEFAULT_BRANCH: main | ||
DOCKERFILE_HADOLINT_FILE_NAME: /.utils/.github/linters/hadolint.yaml | ||
EDITORCONFIG_FILE_NAME: /.editorconfig | ||
FILTER_REGEX_EXCLUDE: .*(ati-smarttag.js|skycons.js|.github/workflows/*|docs/ARCHITECTURE/*|traffic/sftp/*|tmp/*|.mp3|.php|.gpg|.drawio|demo.ejs) | ||
IGNORE_GITIGNORED_FILES: true | ||
JAVASCRIPT_DEFAULT_STYLE: prettier | ||
JAVASCRIPT_ES_CONFIG_FILE: ${{ inputs.javascript-es-config-file }} | ||
JSCPD_CONFIG_FILE: /.utils/.github/linters/jscpd.json | ||
KUBERNETES_KUBEVAL_OPTIONS: --ignore-missing-schemas | ||
LINTER_RULES_PATH: / | ||
# options: ERROR, WARN, NOTICE, VERBOSE, DEBUG or TRACE | ||
LOG_LEVEL: ${{ inputs.log-level }} | ||
MARKDOWN_CONFIG_FILE: /.markdownlint.yaml | ||
NODE_VERSION: 20 | ||
TERRAFORM_TERRASCAN_CONFIG_FILE: /.utils/.github/linters/terrascan.yaml | ||
VALIDATE_ALL_CODEBASE: ${{ inputs.validate-all-codebase }} | ||
VALIDATE_ANSIBLE: false | ||
VALIDATE_ARM: false | ||
# VALIDATE_BASH: true | ||
# VALIDATE_BASH_EXEC: true | ||
VALIDATE_CPP: false | ||
VALIDATE_CLANG_FORMAT: false | ||
VALIDATE_CLOJURE: false | ||
VALIDATE_CLOUDFORMATION: false | ||
VALIDATE_COFFEESCRIPT: false | ||
VALIDATE_CSHARP: false | ||
VALIDATE_CSS: false | ||
VALIDATE_DART: false | ||
# VALIDATE_DOCKERFILE_HADOLINT: true | ||
# VALIDATE_EDITORCONFIG: true | ||
# VALIDATE_ENV: true | ||
VALIDATE_GHERKIN: false | ||
# VALIDATE_GITHUB_ACTIONS: true | ||
# VALIDATE_GITLEAKS: true | ||
VALIDATE_GO: false | ||
VALIDATE_GOOGLE_JAVA_FORMAT: false | ||
VALIDATE_GROOVY: false | ||
# VALIDATE_HTML: true | ||
VALIDATE_JAVA: false | ||
# VALIDATE_JAVASCRIPT_ES: true | ||
# VALIDATE_JAVASCRIPT_STANDARD: true | ||
# VALIDATE_JSCPD: true | ||
# VALIDATE_JSON: true | ||
# VALIDATE_JSX: true | ||
VALIDATE_KOTLIN: false | ||
VALIDATE_KOTLIN_ANDROID: false | ||
# VALIDATE_KUBERNETES_KUBEVAL: true | ||
VALIDATE_LATEX: false | ||
VALIDATE_LUA: false | ||
# VALIDATE_MARKDOWN: true | ||
# VALIDATE_NATURAL_LANGUAGE: true | ||
VALIDATE_OPENAPI: false | ||
VALIDATE_PERL: false | ||
VALIDATE_PHP: false | ||
VALIDATE_PHP_BUILTIN: false | ||
VALIDATE_PHP_PHPCS: false | ||
VALIDATE_PHP_PHPSTAN: false | ||
VALIDATE_PHP_PSALM: false | ||
# VALIDATE_POWERSHELL: true | ||
VALIDATE_PROTOBUF: false | ||
VALIDATE_PYTHON: false | ||
VALIDATE_PYTHON_BLACK: false | ||
VALIDATE_PYTHON_FLAKE8: false | ||
VALIDATE_PYTHON_ISORT: false | ||
VALIDATE_PYTHON_MYPY: false | ||
VALIDATE_PYTHON_PYLINT: false | ||
VALIDATE_R: false | ||
VALIDATE_RAKU: false | ||
VALIDATE_RUBY: false | ||
VALIDATE_RUST_2015: false | ||
VALIDATE_RUST_2018: false | ||
VALIDATE_RUST_2021: false | ||
VALIDATE_RUST_CLIPPY: false | ||
VALIDATE_SCALAFMT: false | ||
VALIDATE_SHELL_SHFMT: false | ||
VALIDATE_SNAKEMAKE_LINT: false | ||
VALIDATE_SNAKEMAKE_SNAKEFMT: false | ||
VALIDATE_STATES: false | ||
VALIDATE_SQL: false | ||
VALIDATE_SQLFLUFF: false | ||
VALIDATE_TEKTON: false | ||
# VALIDATE_TERRAFORM_TERRASCAN: true | ||
# VALIDATE_TERRAFORM_TFLINT: true | ||
VALIDATE_TERRAGRUNT: false | ||
# VALIDATE_TSX: true | ||
# VALIDATE_TYPESCRIPT_ES: true | ||
# VALIDATE_TYPESCRIPT_STANDARD: true | ||
# VALIDATE_XML: true | ||
# VALIDATE_YAML: true | ||
YAML_CONFIG_FILE: /.utils/.github/linters/yamllint.yaml | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Lint Code Base | ||
runs-on: ubuntu-latest-4-cores | ||
timeout-minutes: 90 | ||
permissions: | ||
contents: read | ||
statuses: write | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 👀 Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: true | ||
|
||
- name: 👀 Checkout utils into subfolder | ||
- name: 👀 Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
repository: swrlab/node-utils | ||
ref: 'main' | ||
path: '.utils' | ||
|
||
- name: 🏗 Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: 🛠 Setup Bun | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version: latest | ||
|
||
- name: 📦 Enable Corepack | ||
run: corepack enable | ||
|
||
- name: 🛠 Use Bun (if `use-bun`) | ||
if: inputs.use-bun == true | ||
run: bun install | ||
|
||
- name: 📦 Install Dependencies (if `install:all`) | ||
if: inputs.install-all == true | ||
run: yarn -v && yarn && yarn install:all | ||
|
||
- name: 📦 Install Dependencies (if `install`) | ||
if: inputs.install-all != true && inputs.use-bun != true | ||
run: yarn install | ||
|
||
- name: 🔑 Generate dummy keys (via yarn) | ||
if: inputs.generate-keys == true && inputs.use-bun != true | ||
run: yarn keys:generate | ||
|
||
- name: 🔑 Generate dummy keys (via bun) | ||
if: inputs.generate-keys == true && inputs.use-bun == true | ||
run: bun run keys:generate | ||
- name: 📦 Install Dependencies | ||
run: bun install --frozen-lockfile | ||
|
||
- name: 📚 Lint Code Base | ||
uses: docker://github/super-linter:v4 | ||
with: | ||
context: . | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: bun run lint | ||
|
||
- name: 📚 Run Tests | ||
run: bun run test |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.