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

Feature/junit reporter fix #224

Merged
merged 5 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 55 additions & 0 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: NPM Release

on:
workflow_dispatch:
inputs:
versionType:
description: 'Version type (major, minor, patch)'
required: true
default: 'patch'
branches:
- master

jobs:
npm-release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # fetch all history so that we can determine the version bump

- name: Configure Git
run: |
git config --global user.name "${{ secrets.GIT_USER_NAME }}"
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org/'

- name: Install dependencies
run: npm install

- name: Run Tests
run: |
npx playwright install --with-deps chromium
npm test

- name: Bump version
run: npm version ${{ github.event.inputs.versionType }} -m "Upgrade to %s"

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Push changes and tags
run: |
git config user.name "${{ secrets.GIT_USER_NAME }}"
git config user.email "${{ secrets.GIT_USER_EMAIL }}"
git push
git push --tags
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test

on:
push:
branches: [master]
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- run: npm install
- run: npx playwright install --with-deps chromium
- run: npm test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dist
.vscode
.DS_Store
.idea/
package-lock.json
results
artifacts

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,11 @@ await checkA11y(
},
true,
'junit',
{
outputFilename: 'junit.xml'
}
{
outputDirPath: 'results',
outputDir: 'accessibility',
reportFileName: 'accessibility-audit.xml',
},
)
```
## Before you Go
Expand Down
Loading
Loading