Skip to content

Commit 9c1ce3a

Browse files
Merge pull request #224 from abhinaba-ghosh/feature/junit-reporter-fix
Feature/junit reporter fix
2 parents c627d35 + 26d327a commit 9c1ce3a

File tree

9 files changed

+5052
-65
lines changed

9 files changed

+5052
-65
lines changed

.github/workflows/npm-release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: NPM Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
versionType:
7+
description: 'Version type (major, minor, patch)'
8+
required: true
9+
default: 'patch'
10+
branches:
11+
- master
12+
13+
jobs:
14+
npm-release:
15+
if: github.ref == 'refs/heads/master'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0 # fetch all history so that we can determine the version bump
22+
23+
- name: Configure Git
24+
run: |
25+
git config --global user.name "${{ secrets.GIT_USER_NAME }}"
26+
git config --global user.email "${{ secrets.GIT_USER_EMAIL }}"
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v2
30+
with:
31+
node-version: '16'
32+
registry-url: 'https://registry.npmjs.org/'
33+
34+
- name: Install dependencies
35+
run: npm install
36+
37+
- name: Run Tests
38+
run: |
39+
npx playwright install --with-deps chromium
40+
npm test
41+
42+
- name: Bump version
43+
run: npm version ${{ github.event.inputs.versionType }} -m "Upgrade to %s"
44+
45+
- name: Publish to npm
46+
run: npm publish
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
50+
- name: Push changes and tags
51+
run: |
52+
git config user.name "${{ secrets.GIT_USER_NAME }}"
53+
git config user.email "${{ secrets.GIT_USER_EMAIL }}"
54+
git push
55+
git push --tags

.github/workflows/tests.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: '16'
16+
cache: 'npm'
17+
- run: npm install
18+
- run: npx playwright install --with-deps chromium
19+
- run: npm test

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ dist
44
.vscode
55
.DS_Store
66
.idea/
7-
package-lock.json
87
results
98
artifacts
109

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,9 +330,11 @@ await checkA11y(
330330
},
331331
true,
332332
'junit',
333-
{
334-
outputFilename: 'junit.xml'
335-
}
333+
{
334+
outputDirPath: 'results',
335+
outputDir: 'accessibility',
336+
reportFileName: 'accessibility-audit.xml',
337+
},
336338
)
337339
```
338340
## Before you Go

0 commit comments

Comments
 (0)