Skip to content

Bump actions/upload-artifact from 4.1.0 to 4.3.0 #404

Bump actions/upload-artifact from 4.1.0 to 4.3.0

Bump actions/upload-artifact from 4.1.0 to 4.3.0 #404

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
name: "Front-end"
# ECMAScript version: ES5 (2009), ES6 (2015), ECMAScript 2016, 2017, 2018 ...
# Node.js version: 18.12
# npm version: 9.2
#
# https://github.com/tc39/proposals/blob/main/finished-proposals.md
# https://kangax.github.io/compat-table/es6/
# https://nodejs.dev/en/about/releases/
# https://www.npmjs.com/package/npm?activeTab=versions
# Set engine versions in package.json
# {
# "engines": {
# "node": "^18.12",
# "npm": "please-use-yarn",
# "yarn": "^1.22.19"
# }
# }
# Yarn is a better package manager.
on: # yamllint disable-line rule:truthy
pull_request: null
push:
branches:
- "master"
# Add [skip ci] to commit message to skip CI.
permissions: {} # yamllint disable-line rule:braces
#permissions: "read-all"
#permissions:
# contents: "read" # Private repositories need read permission
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@v3.6.0"
-
name: "Set up Node.js"
uses: "actions/setup-node@v4.0.1"
with:
node-version: "18"
check-latest: true
cache: "npm"
# cache: "yarn"
-
name: "Enable strict engine checking"
run: "npm config set engine-strict true"
#run: "yarn config set engine-strict true"
-
name: "Install all dependencies"
run: "npm ci"
#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 -- npx acorn --ecma2015 --module --silent
js_coding_standards:
name: "𝟐 JavaScript Coding Standards"
needs:
- "js_syntax_errors"
permissions:
checks: "write"
contents: "read"
pull-requests: "read"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v3.6.0"
-
name: "Set up Node.js"
uses: "actions/setup-node@v4.0.1"
with:
node-version: "18"
cache: "npm"
# cache: "yarn"
-
name: "Enable strict engine checking"
run: "npm config set engine-strict true"
#run: "yarn config set engine-strict true"
-
name: "Install all dependencies"
run: "npm ci"
#run: "yarn install --non-interactive --pure-lockfile"
-
name: "Run ESLint"
run: "npm run js:eslint -- --format json --output-file '${{ runner.temp }}/eslint-report.json'"
#run: "yarn run js:eslint --format json --output-file '${{ runner.temp }}/eslint-report.json'"
continue-on-error: true
-
name: "Annotate ESLint Results"
uses: "ataylorme/eslint-annotate-action@2.2.0"
with:
check-name: "𝕩 ESLint Annotations"
repo-token: "${{ github.token }}"
report-json: "${{ runner.temp }}/eslint-report.json"
scss_coding_standards:
name: "𝟑 Sassy CSS Coding Standards"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v3.6.0"
-
name: "Set up Node.js"
uses: "actions/setup-node@v4.0.1"
with:
node-version: "18"
cache: "npm"
# cache: "yarn"
-
name: "Enable strict engine checking"
run: "npm config set engine-strict true"
#run: "yarn config set engine-strict true"
-
name: "Install all dependencies"
run: "npm ci"
#run: "yarn install --non-interactive --pure-lockfile"
-
name: "Detect coding standards violations"
run: "npm run scss:cs -- --formatter github"
#run: "yarn run scss:cs --formatter github"
svg:
name: "𝟒 SVG validity"
runs-on: "ubuntu-22.04"
timeout-minutes: 1
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v3.6.0"
-
name: "Validate SVG files"
uses: "szepeviktor/svg-validator@v1.0.0"
with:
svg_path: "public/**/*.svg"
build:
name: "𝟓 Build"
needs:
- "js_coding_standards"
- "scss_coding_standards"
- "svg"
runs-on: "ubuntu-22.04"
timeout-minutes: 5
steps:
-
name: "Checkout repository"
uses: "actions/checkout@v3.6.0"
-
name: "Set up Node.js"
uses: "actions/setup-node@v4.0.1"
with:
node-version: "18"
cache: "npm"
# cache: "yarn"
-
name: "Enable strict engine checking"
run: "npm config set engine-strict true"
#run: "yarn config set engine-strict true"
-
name: "Install production dependencies"
run: "npm ci --omit=dev"
#run: "yarn install --non-interactive --pure-lockfile --production=true"
-
name: "Checks for security vulnerability advisories"
run: "npm audit --omit=dev"
#run: "yarn audit"
-
name: "Build front-end"
run: "npm run prod:build"
#run: "yarn run prod:build"
-
name: "Check differences to repository"
run: "git diff --exit-code"
# Job numbers: https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols
# JavaScript documentation: https://jsdoc.app/ https://www.npmjs.com/package/eslint-plugin-jsdoc
# Validate HTML: https://www.npmjs.com/package/html-validate
# Validate JSON schema: https://www.npmjs.com/package/ajv