-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to
[email protected]
, add publishing workflow (#213)
* Add publishing workflow * Trigger on push to `main` instead of `master` * Test for all pull request targets * Always run linter * Fix node-version variable name * Require `pa11y-lint-config@^3.0.0` * Fix outdated GitHub repo names * Limit Ubuntu support to `20.04` for `pa11y-ci@3` * Add a note for the Pa11y CI issue in Ubuntu * Remove broken dependencies badge * Remove table of contents since GitHub attempts to provide one * Clarify Node support for `pa11y-ci@3` as `12`, `14`, `16` * Provide an example for `--config`, other tweaks * Revise sitemaps, reporters, contributing * Apply new support policy and update table * Upgrade `pa11y` to `^6.2.3` from `~6.1`, following on from #179 Co-Authored-By: Aaron Goldenthal <[email protected]> * Update `async` to `~2.6.4` as shown in #185 ; lockfile was already there Co-Authored-By: nicodemuz <[email protected]> * Switch publisher back to `ubuntu-20.04` * Replace Travis badge with GitHub Actions badge * Update `.editorconfig` to match other Pa11y repos * Set `package.engines.node` to warn outside Node 12-16 * Add `.nvmrc` and set to `14` (12 doesn't run well on Apple Silicon) * Fix `lockfile-version` as `3`, upgrade lockfile from `1` to `3` * Fix Markdown issues and gremlins * Remove unused link definitions * Use more detail to describe Ubuntu issue affecting Pa11y CI 3 * Revert "Fix `lockfile-version` as `3`, upgrade lockfile from `1` to `3`" This reverts commit b9f1af2. * Fix `lockfile-version` to `2`, retaining compatibility with npm 6 (Node 12's bundled npm) * Move glob readme URL into footnotes * Tie together the two lines describing the `object` form of the URL * Fix link definition for `ubuntu-fix` * Add Node versions `18` and `20` to test matrix * Return `engines.node` to `>= 12`, but emphasis the Ubuntu caveat * Update the documented output of `pa11y-ci --help` to match its current form * Remove double-mention of npm commands * Settle on lower-case for OS names * Unquote simple strings * Move linting into its own job * Allow `fail-fast` now that tests are stabilising and linting is separated * Add placeholder to changelog for `3.1` * Fix list indentation in contributing guide * Improve run names inside `test` * Double integration test timeout to preempt locally observed flake * Remove Markdown note now that the Ubuntu note has its own section * Garden the readme * Replace v3 asterisk with named 'Ubuntu caveat' * Revert "Allow `fail-fast` now that tests are stabilising and linting is separated" This reverts commit bd5a094. --------- Co-authored-by: Aaron Goldenthal <[email protected]> Co-authored-by: nicodemuz <[email protected]>
- Loading branch information
1 parent
3a5104b
commit ba40d6f
Showing
10 changed files
with
4,768 additions
and
322 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = tab | ||
indent_size = 4 | ||
indent_style = tab | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[package.json] | ||
indent_style = spaces | ||
indent_size = 2 | ||
|
||
[*.md] | ||
indent_style = spaces | ||
indent_style = space | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[package.json] | ||
indent_style = space | ||
indent_size = 2 |
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,37 @@ | ||
on: | ||
release: | ||
types: [created, edited, published] | ||
workflow_dispatch: | ||
inputs: | ||
dryRun: | ||
description: Dry run only | ||
required: true | ||
default: true | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: https://registry.npmjs.org | ||
- run: npm ci | ||
|
||
- name: Publish package | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_PUBLISH_TOKEN }} | ||
if: > | ||
(github.event_name == 'release' && github.event.action == 'published') || | ||
(github.event_name == 'workflow_dispatch' && !inputs.dryRun) | ||
run: npm publish | ||
|
||
- name: Publish package (dry run) | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_PUBLISH_TOKEN }} | ||
if: > | ||
(github.event_name == 'release' && github.event.action != 'published') || | ||
(github.event_name == 'workflow_dispatch' && inputs.dryRun) | ||
run: npm publish --dry-run |
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,46 +1,37 @@ | ||
# This workflow will do a clean install of node dependencies, build the source code and run tests. | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Build and lint | ||
|
||
on: | ||
push: | ||
branches: # Run actions when code is committed to these branches | ||
- master | ||
branches: | ||
- main | ||
pull_request: | ||
branches: # Run actions when a PR is pushed based on one of these branches | ||
- '**' | ||
|
||
jobs: | ||
checkout_and_test: | ||
name: Node v${{ matrix.node }} on ${{ matrix.os }} | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 12 | ||
- run: npm ci | ||
- run: npm run lint | ||
|
||
test: | ||
name: test on ${{ matrix.os }} with node ${{ matrix.node-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
node: [12, 14, 16] | ||
include: | ||
- os: ubuntu-latest | ||
node: 12 | ||
lint: true # Linter is run only once to shorten the total build time | ||
|
||
os: [ubuntu-20.04, windows-latest, macos-latest] | ||
node-version: [12, 14, 16, 18, 20] | ||
steps: | ||
- name: Set git config | ||
- name: Normalise line-ending handling in Git | ||
shell: bash | ||
run: | | ||
git config --global core.autocrlf false | ||
if: runner.os == 'Windows' | ||
- name: Checkout code from ${{ github.repository }} | ||
uses: actions/checkout@v3 | ||
- name: Setup node ${{ matrix.node }} | ||
uses: actions/setup-node@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run linter | ||
if: ${{ matrix.lint }} | ||
run: npm run lint | ||
- name: Run tests | ||
run: npm test | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm test |
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 @@ | ||
lockfile-version=2 |
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 @@ | ||
14 |
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
Oops, something went wrong.