Skip to content

Commit

Permalink
Merge pull request #1583 from update-apg-1.2
Browse files Browse the repository at this point in the history
Update apg-1.2 with latest from master branch
  • Loading branch information
mcking65 authored Oct 25, 2020
2 parents d23f387 + e701d9b commit 7ae1acf
Show file tree
Hide file tree
Showing 194 changed files with 28,659 additions and 20,547 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "eslint:recommended",
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"env": {
"browser": true
},
Expand Down
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
60 changes: 60 additions & 0 deletions .github/workflows/coverage-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Regression Tests Coverage Report

on:
pull_request_target:
paths:
- "examples/**"
- "test/**"
- "!examples/landmarks/**"

jobs:
report:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: refs/pull/${{ github.event.pull_request.number }}/head

- name: Install dependencies
run: npm ci

- name: Run coverage report
run: |
node test/util/report.js >> coverage.log || true
- name: Comment on PR
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs');
const commentBody = fs.readFileSync('coverage.log', 'utf8');
if (commentBody.length === 0) {
return
}
// Get the existing comments.
const {data: comments} = await github.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.number,
})
// Find any comment already made by the bot.
const botComment = comments.find(comment => comment.user.id === 41898282)
if (botComment) {
await github.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body: commentBody
})
} else {
await github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.number,
body: commentBody
})
}
16 changes: 16 additions & 0 deletions .github/workflows/cspell-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "cspell",
"pattern": [
{
"regexp": "^(.*):(\\d+):(\\d+)\\s+\\-\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
}
]
}
40 changes: 40 additions & 0 deletions .github/workflows/lint-css.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CSS Linting
on:
push:
branches-ignore:
- "dependabot/**"
paths:
- "package*.json"
- ".prettier*"
- ".stylelint*"
- "**/*.css"
- ".github/workflows/lint-css.yml"
- "!common/**"

pull_request:
paths:
- "package*.json"
- ".prettier*"
- ".stylelint*"
- "**/*.css"
- ".github/workflows/lint-css.yml"
- "!common/**"

jobs:
lint-css:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/[email protected]

- uses: xt0rted/stylelint-problem-matcher@v1

- name: Install npm dependencies
run: npm ci

- name: Stylelint
run: npm run lint:css
40 changes: 40 additions & 0 deletions .github/workflows/lint-html.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: HTML Linting
on:
push:
branches-ignore:
- "dependabot/**"
paths:
- "package*.json"
- ".vnurc"
- "aria-practices.html"
- "examples/**/*.html"
- ".github/workflows/lint-html.yml"
- ".github/workflows/vnu-jar-problem-matcher.json"

pull_request:
paths:
- "package*.json"
- ".vnurc"
- "aria-practices.html"
- "examples/**/*.html"
- ".github/workflows/lint-html.yml"
- ".github/workflows/vnu-jar-problem-matcher.json"

jobs:
lint-html:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/[email protected]

- name: Install npm dependencies
run: npm ci

- name: HTML Validator
run: |
echo "::add-matcher::.github/workflows/vnu-jar-problem-matcher.json"
npm run lint:html
40 changes: 40 additions & 0 deletions .github/workflows/lint-js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: JavaScript Linting
on:
push:
branches-ignore:
- "dependabot/**"
paths:
- "package*.json"
- ".prettier*"
- ".eslint*"
- "**/*.js"
- ".github/workflows/lint-js.yml"
- "!common/**"

pull_request:
paths:
- "package*.json"
- ".prettier*"
- ".eslint*"
- "**/*.js"
- ".github/workflows/lint-js.yml"
- "!common/**"

jobs:
lint-js:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

# setup-node task is used without a particular version in order to load
# the ESLint problem matchers
- name: Set up Node.js
uses: actions/[email protected]

- name: Install npm dependencies
run: npm ci

- name: ESLint
run: npm run lint:es
59 changes: 59 additions & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Run regression tests

on:
pull_request:
paths:
- ".github/workflows/regression.yml"
- "package*.json"
- "test/**"
- "examples/**"
- "!examples/landmarks/**"
- "!examples/coding-template/**"
push:
branches-ignore:
- master
- "dependabot/**"
paths:
- ".github/workflows/regression.yml"
- "package*.json"
- "test/**"
- "examples/**"
- "!examples/landmarks/**"
- "!examples/coding-template/**"

jobs:
regression:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
CI_NODE_INDEX: [0, 1, 2, 3, 4]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/[email protected]

- name: Install npm dependencies
run: npm ci

- name: Run Ava on changed files in PR
run: ./scripts/regression-tests.sh
if: github.event_name == 'pull_request'
env:
COMMIT_RANGE: "origin/${{ github.base_ref }}...${{ github.sha }}"
CI_NODE_TOTAL: 5
CI_NODE_INDEX: ${{ matrix.CI_NODE_INDEX }}
TEST_WAIT_TIME: 10000

- name: Run Ava for changed files from origin branch
run: ./scripts/regression-tests.sh
if: github.event_name == 'push'
env:
COMMIT_RANGE: "origin/master...${{ github.ref }}"
CI_NODE_TOTAL: 5
CI_NODE_INDEX: ${{ matrix.CI_NODE_INDEX }}
TEST_WAIT_TIME: 10000
41 changes: 41 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Spellcheck

on:
push:
branches-ignore:
- "dependabot/**"
paths:
- "package*.json"
- "cspell.json"
- "aria-practices.html"
- "examples/**/*.html"
- ".github/workflows/cspell-problem-matcher.json"
- ".github/workflows/spelling.yml"

pull_request:
paths:
- "package*.json"
- "cspell.json"
- "aria-practices.html"
- "examples/**/*.html"
- ".github/workflows/cspell-problem-matcher.json"
- ".github/workflows/spelling.yml"

jobs:
spelling:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/[email protected]

- name: Install npm dependencies
run: npm ci

- name: cSpell
run: |
echo "::add-matcher::.github/workflows/cspell-problem-matcher.json"
npm run lint:spelling
17 changes: 17 additions & 0 deletions .github/workflows/vnu-jar-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "vnu-jar",
"pattern": [
{
"regexp": "^\"file:(.*)\":(\\d+).(\\d+)-\\d+\\.\\d+:\\s(error|warning):\\s(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
]
}
]
}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore external copied w3c files
common
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
13 changes: 11 additions & 2 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"extends": ["stylelint-config-standard", "stylelint-prettier/recommended"],
"rules": {
"media-feature-name-no-unknown": [true,
"ignoreMediaFeatureNames": ["forced-colors"] ]
"media-feature-name-no-unknown": [
true,
{
"ignoreMediaFeatureNames": [
"forced-colors"
]
}
],
"no-descending-specificity": null,
"prettier/prettier": [true, {"singleQuote": false}]
}
}
3 changes: 0 additions & 3 deletions .stylelintrc.js

This file was deleted.

Loading

0 comments on commit 7ae1acf

Please sign in to comment.