Skip to content

lint

lint #710

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: "Front-end"
# ECMAScript version: 2018
# Node.js version: 18.12
# Yarn version: 1
on:
pull_request: null
push:
branches:
- "master"
# Add [skip ci] to commit message to skip CI.
permissions:
contents: "read"
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
js_syntax_errors:
name: "𝟏 JavaScript Syntax Errors"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v4"
-
name: "Set up Node.js"
uses: "actions/setup-node@v4"
with:
node-version: "18"
check-latest: true
cache: "yarn"
-
name: "Configure yarn"
run: "yarn config set engine-strict true"
-
name: "Install all dependencies"
run: "yarn install --non-interactive --pure-lockfile"
-
name: "Check JavaScript files for syntax errors"
run: |
git ls-files --cached -z -- 'resources/js/*.js' \
| xargs --null -- yarn run acorn --ecma2018 --module --silent
scss_coding_standards:
name: "𝟐 Sassy CSS Coding Standards"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v4"
-
name: "Set up Node.js"
uses: "actions/setup-node@v4"
with:
node-version: "18"
cache: "yarn"
-
name: "Configure yarn"
run: "yarn config set engine-strict true"
-
name: "Install all dependencies"
run: "yarn install --non-interactive --pure-lockfile"
-
name: "Detect coding standards violations"
run: "yarn run sass:lint --formatter github"
build:
name: "𝟑 Build"
needs:
- "js_syntax_errors"
- "scss_coding_standards"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v4"
-
name: "Set up Node.js"
uses: "actions/setup-node@v4"
with:
node-version: "18"
cache: "yarn"
-
name: "Configure yarn"
run: "yarn config set engine-strict true"
-
name: "Install production dependencies"
run: "yarn install --non-interactive --pure-lockfile"
-
name: "Build front-end"
run: "yarn run prod:build"
-
name: "Check differences to repository"
run: "git diff --exit-code"
svg:
name: "𝟓 SVG files"
runs-on: "ubuntu-22.04"
timeout-minutes: 1
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v4"
-
name: "Validate SVG files"
uses: "szepeviktor/[email protected]"
with:
svg_path: "public/**/*.svg"
-
name: "Validate GitHub files"
uses: "szepeviktor/[email protected]"
with:
svg_path: ".github/**/*.svg"