Skip to content

ci: upgrade superlinter from v5 to v7 #806

ci: upgrade superlinter from v5 to v7

ci: upgrade superlinter from v5 to v7 #806

Workflow file for this run

name: Main
on:
push:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DEFAULT_BRANCH: main
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup rushjs
uses: ./.github/actions/setup-rush
with:
build: true
build-cache: true
- name: Checking for missing changelogs
uses: ./.github/actions/run-rush
with:
command: change
args: --verify
spellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Running cspell
uses: streetsidesoftware/cspell-action@v5
with:
config: ".github/linters/cspell.json"
# Log progress and other information during the action execution.
verbose: true
# Determines if the action should be failed
# if any spelling issues are found.
strict: true
# Limit the files checked to the ones in the pull request or push.
# We will enabled this only if this job tooks more than 3 minutes
incremental_files_only: false
# Notification level to use with inline reporting of spelling errors.
# Allowed values are: warning, error, none
inline: warning
licensecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Scanning dependencies
uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
- name: Testing dependencies
uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
run-tests: true
lintcheck:
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Linting
## https://github.com/super-linter/super-linter#slim-image
uses: super-linter/super-linter/slim@v7
env:
DEFAULT_BRANCH: ${{ env.DEFAULT_BRANCH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_GITIGNORED_FILES: true
IGNORE_GENERATED_FILES: true
# For markdownlint, as it cannot exclude file from config file
# exclude reviews file because it autogen file
FILTER_REGEX_EXCLUDE: common/reviews/api/*
VALIDATE_ALL_CODEBASE: false
VALIDATE_CHECKOV: true
VALIDATE_EDITORCONFIG: true
VALIDATE_ENV: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_GITLEAKS: true
VALIDATE_JSCPD: true
VALIDATE_NATURAL_LANGUAGE: true
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_XML: true
VALIDATE_JSON_PRETTIER: true
VALIDATE_JSONC: true
VALIDATE_MARKDOWN_PRETTIER: true
VALIDATE_MARKDOWN: true
VALIDATE_YAML: true
YAML_CONFIG_FILE: .yamllint.yml
YAML_ERROR_ON_WARNING: true
testing:
runs-on: ubuntu-latest
needs:
- changelog
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup rushjs
uses: ./.github/actions/setup-rush
with:
build: true
build-cache: true
- name: Testing packages
uses: ./.github/actions/run-rush
with:
command: test
- name: Analysis packages
uses: SonarSource/sonarcloud-github-action@v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
alternative-testing:
runs-on: ubuntu-latest
strategy:
matrix:
# Support backward 'LTS' version and 'current' version
# https://github.com/nodejs/release#release-schedule
# https://nodejs.org/en/blog/release
node-version: [18, 20]
needs:
- testing
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup rushjs
uses: ./.github/actions/setup-rush
with:
node-version: ${{ matrix.node-version }}
build: true
build-cache: true
- name: Testing packages
uses: ./.github/actions/run-rush
with:
command: test