diff --git a/.github/root-logo-dark.svg b/.github/root-logo-dark.svg index e61e9735..51155ec6 100644 --- a/.github/root-logo-dark.svg +++ b/.github/root-logo-dark.svg @@ -1,6 +1,6 @@ - + @@ -43,10 +43,30 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.github/root-logo-light.svg b/.github/root-logo-light.svg index 4db93940..18321b27 100644 --- a/.github/root-logo-light.svg +++ b/.github/root-logo-light.svg @@ -1,6 +1,6 @@ - + @@ -43,10 +43,30 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.github/workflows/front-end.yml b/.github/workflows/front-end.yml new file mode 100644 index 00000000..2b3cdd2e --- /dev/null +++ b/.github/workflows/front-end.yml @@ -0,0 +1,122 @@ +# 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@v3" + - + name: "Set up Node.js" + uses: "actions/setup-node@v3" + 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@v3" + - + name: "Set up Node.js" + uses: "actions/setup-node@v3" + 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@v3" + - + name: "Set up Node.js" + uses: "actions/setup-node@v3" + 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@v3" + - + name: "Validate SVG files" + uses: "szepeviktor/svg-validator@v1.0.0" + with: + svg_path: "public/**/*.svg" + - + name: "Validate GitHub files" + uses: "szepeviktor/svg-validator@v1.0.0" + with: + svg_path: ".github/**/*.svg" diff --git a/package.json b/package.json index 35ce08f6..24e85936 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,11 @@ "scripts": { "dev": "vite", "build": "vite build", - "lint:sass": "stylelint resources/sass/" + "prod:build": "vite build", + "sass:lint": "stylelint resources/sass/" }, "dependencies": { + "acorn": "^8.10.0", "alpinejs": "^3.12.3", "laravel-vite-plugin": "^0.7.8", "postcss": "^8.2.4", @@ -19,5 +21,7 @@ "devDependencies": { "stylelint": "^14.2.0" }, - "version": "0.0.0" + "engines": { + "node": "^18.0" + } } diff --git a/public/image-loading-placeholder.svg b/public/image-loading-placeholder.svg index 6e4343a8..cb6892a5 100644 --- a/public/image-loading-placeholder.svg +++ b/public/image-loading-placeholder.svg @@ -1 +1,19 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + diff --git a/public/img/favicon.svg b/public/img/favicon.svg index 5ed95806..04a9485b 100644 --- a/public/img/favicon.svg +++ b/public/img/favicon.svg @@ -1,4 +1,6 @@ - + + + @@ -21,10 +23,30 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/img/root-logo.svg b/public/img/root-logo.svg index 8748bca5..9d2bd014 100644 --- a/public/img/root-logo.svg +++ b/public/img/root-logo.svg @@ -1,5 +1,7 @@ - -