-
Notifications
You must be signed in to change notification settings - Fork 5
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 #18 from WebDevStudios/release/0.1.0
Release/0.1.0
- Loading branch information
Showing
66 changed files
with
10,447 additions
and
11,997 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
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,70 +1,110 @@ | ||
name: Code Quality | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Cancel previous workflow run groups that have not completed. | ||
concurrency: | ||
# Group workflow runs by workflow name, along with the head branch ref of the pull request | ||
# or otherwise the branch or tag ref. | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint-css: | ||
name: 'Lint: CSS' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install Node dependencies | ||
run: npm ci | ||
env: | ||
CI: true | ||
|
||
- name: Detect coding standard violations (stylelint) | ||
run: npm run lint:css | ||
|
||
lint-php: | ||
name: 'Lint: PHP' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
coverage: none | ||
tools: cs2pr | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Configure Composer cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install Composer dependencies | ||
run: composer install --prefer-dist --optimize-autoloader --no-progress --no-interaction | ||
|
||
- name: Validate composer.json | ||
run: composer --no-interaction validate --no-check-all | ||
|
||
- name: Detect coding standard violations (PHPCS) | ||
run: npm run lint:php | ||
phpcs: | ||
name: PHPCS check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
ini-values: 'memory_limit=1G' | ||
coverage: none | ||
tools: cs2pr | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Configure Composer cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
custom-cache-suffix: $(date -u "+%Y-%m") | ||
|
||
- name: Validate composer.json | ||
run: composer --no-interaction validate --no-check-all | ||
|
||
- name: Detect coding standard violations (PHPCS) | ||
run: vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.txt | ||
|
||
- name: Upload PHPCS report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: phpcs-report | ||
path: phpcs-report.txt | ||
|
||
stylelint: | ||
name: 'Lint: CSS' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.12.2' | ||
cache: 'npm' | ||
|
||
- name: Unset npm_config_prefix | ||
run: unset npm_config_prefix | ||
|
||
- name: Check Node version | ||
run: node -v | ||
|
||
- name: Install Node dependencies | ||
run: npm ci | ||
env: | ||
CI: true | ||
|
||
- name: Lint Stylesheets | ||
run: npm run lint:css | ||
|
||
eslint: | ||
name: 'Lint: JS' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.12.2' | ||
cache: 'npm' | ||
|
||
- name: Unset npm_config_prefix | ||
run: unset npm_config_prefix | ||
|
||
- name: Check Node version | ||
run: node -v | ||
|
||
- name: Install Node dependencies | ||
run: npm ci | ||
env: | ||
CI: true | ||
|
||
- name: Lint JavaScript | ||
run: npm run lint:js |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Security | ||
|
||
on: | ||
# Run on all pushes and on all pull requests. | ||
push: | ||
pull_request: | ||
# Also run this workflow every Monday at 6:00. | ||
schedule: | ||
- cron: '0 6 * * 1' | ||
# Allow manually triggering the workflow. | ||
workflow_dispatch: | ||
|
||
# Cancels all previous workflow runs for the same branch that have not yet completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
security: | ||
name: 'Security check' | ||
runs-on: ubuntu-latest | ||
|
||
# Don't run the cronjob in this workflow on forks. | ||
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'webdevstudios') | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
# This action checks the `composer.lock` file against known security vulnerabilities in the dependencies. | ||
# https://github.com/marketplace/actions/the-php-security-checker | ||
- name: Run Security Check | ||
uses: symfonycorp/security-checker-action@v5 |
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 |
---|---|---|
|
@@ -26,3 +26,4 @@ build/ | |
|
||
#tests | ||
pa11y-ci-report/ | ||
phpcs-report.txt |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
build | ||
node_modules | ||
vendor | ||
readme.md |
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 +1 @@ | ||
20 | ||
v20.12.2 |
Oops, something went wrong.