Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to [email protected], add publishing workflow #213

Merged
merged 47 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8b7a36f
Add publishing workflow
danyalaytekin Oct 26, 2023
7783acd
Trigger on push to `main` instead of `master`
danyalaytekin Oct 26, 2023
9fd8c39
Test for all pull request targets
danyalaytekin Oct 26, 2023
f9ebfb4
Always run linter
danyalaytekin Oct 26, 2023
d26dadc
Fix node-version variable name
danyalaytekin Nov 3, 2023
e1879eb
Require `pa11y-lint-config@^3.0.0`
danyalaytekin Nov 3, 2023
b99a8fb
Fix outdated GitHub repo names
danyalaytekin Nov 3, 2023
47a3a26
Limit Ubuntu support to `20.04` for `pa11y-ci@3`
danyalaytekin Nov 10, 2023
8c53f80
Add a note for the Pa11y CI issue in Ubuntu
danyalaytekin Nov 10, 2023
648b636
Remove broken dependencies badge
danyalaytekin Nov 10, 2023
0a237a0
Remove table of contents since GitHub attempts to provide one
danyalaytekin Nov 10, 2023
7465d79
Clarify Node support for `pa11y-ci@3` as `12`, `14`, `16`
danyalaytekin Nov 10, 2023
5297c06
Provide an example for `--config`, other tweaks
danyalaytekin Nov 10, 2023
87a4dd4
Revise sitemaps, reporters, contributing
danyalaytekin Nov 10, 2023
5969b10
Apply new support policy and update table
danyalaytekin Nov 10, 2023
592668e
Upgrade `pa11y` to `^6.2.3` from `~6.1`, following on from #179
danyalaytekin Nov 10, 2023
4a38e36
Update `async` to `~2.6.4` as shown in #185 ; lockfile was already there
danyalaytekin Nov 10, 2023
d3f9d84
Switch publisher back to `ubuntu-20.04`
danyalaytekin Nov 10, 2023
dc68dff
Replace Travis badge with GitHub Actions badge
danyalaytekin Nov 10, 2023
95cc865
Update `.editorconfig` to match other Pa11y repos
danyalaytekin Nov 12, 2023
d7336c1
Set `package.engines.node` to warn outside Node 12-16
danyalaytekin Nov 13, 2023
ae21dce
Add `.nvmrc` and set to `14` (12 doesn't run well on Apple Silicon)
danyalaytekin Nov 13, 2023
b9f1af2
Fix `lockfile-version` as `3`, upgrade lockfile from `1` to `3`
danyalaytekin Nov 13, 2023
5ee2d05
Fix Markdown issues and gremlins
danyalaytekin Nov 13, 2023
7a2516a
Remove unused link definitions
danyalaytekin Nov 13, 2023
2db05ca
Use more detail to describe Ubuntu issue affecting Pa11y CI 3
danyalaytekin Nov 13, 2023
b492e3a
Revert "Fix `lockfile-version` as `3`, upgrade lockfile from `1` to `3`"
danyalaytekin Nov 13, 2023
36bd2f3
Fix `lockfile-version` to `2`, retaining compatibility with npm 6 (No…
danyalaytekin Nov 13, 2023
2b8ab88
Move glob readme URL into footnotes
danyalaytekin Nov 13, 2023
6c22783
Tie together the two lines describing the `object` form of the URL
danyalaytekin Nov 13, 2023
401f871
Fix link definition for `ubuntu-fix`
danyalaytekin Nov 13, 2023
b265864
Add Node versions `18` and `20` to test matrix
danyalaytekin Nov 13, 2023
beb3eaa
Return `engines.node` to `>= 12`, but emphasis the Ubuntu caveat
danyalaytekin Nov 14, 2023
cde2f0c
Update the documented output of `pa11y-ci --help` to match its curren…
danyalaytekin Nov 14, 2023
f0745c6
Remove double-mention of npm commands
danyalaytekin Nov 14, 2023
b975468
Settle on lower-case for OS names
danyalaytekin Nov 14, 2023
25d0d3a
Unquote simple strings
danyalaytekin Nov 14, 2023
37ac6c4
Move linting into its own job
danyalaytekin Nov 14, 2023
bd5a094
Allow `fail-fast` now that tests are stabilising and linting is separ…
danyalaytekin Nov 14, 2023
2dab7c3
Add placeholder to changelog for `3.1`
danyalaytekin Nov 14, 2023
8f54f00
Fix list indentation in contributing guide
danyalaytekin Nov 14, 2023
acf418d
Improve run names inside `test`
danyalaytekin Nov 14, 2023
f8a473c
Double integration test timeout to preempt locally observed flake
danyalaytekin Nov 14, 2023
85e5a4f
Remove Markdown note now that the Ubuntu note has its own section
danyalaytekin Nov 14, 2023
0f024d4
Garden the readme
danyalaytekin Nov 14, 2023
ab4a662
Replace v3 asterisk with named 'Ubuntu caveat'
danyalaytekin Nov 14, 2023
3ab18fd
Revert "Allow `fail-fast` now that tests are stabilising and linting …
danyalaytekin Nov 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .editorconfig
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
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
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
53 changes: 22 additions & 31 deletions .github/workflows/tests.yml
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
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lockfile-version=2
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

# 3.0.1 (2021-12-20)
## 3.1.0 (2023-11-14)

* Placeholder

## 3.0.1 (2021-12-20)

* missing await for async function (thanks @aarongoldenthal)

Expand Down
9 changes: 3 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Contributing Guide

Thanks for getting involved :tada:
Expand All @@ -7,11 +6,9 @@ The Pa11y team loves to see new contributors, and we strive to provide a welcomi

Our website outlines the many ways that you can contribute to Pa11y:

- [Help us to talk to our users][communications]
- [Help us out with design][designers]
- [Help us with our code][developers]


- [Help us to talk to our users][communications]
- [Help us out with design][designers]
- [Help us with our code][developers]

[code-of-conduct]: https://pa11y.org/contributing/code-of-conduct/
[communications]: https://pa11y.org/contributing/communications/
Expand Down
Loading
Loading