8000 feat(action): upload artifact by j-mendez · Pull Request #50 · a11ywatch/github-actions · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(action): upload artifact #50

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

Merged
merged 2 commits into from
Sep 27, 2023
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
8 changes: 5 additions & 3 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ jobs:
- name: A11yWatch website scan
uses: ./
with:
WEBSITE_URL: https://a11ywatch.com
FAIL_TOTAL_COUNT: 100
WEBSITE_URL: https://jeffmendez.com
FAIL_TOTAL_COUNT: 40
EXTERNAL: false
SITE_WIDE: true
SITEMAP: true
SUBDOMAINS: true
TLD: true
LIST: true
UPGRADE: true
RECORD: recordings
UPLOAD: true
# env:
# DEFAULT_RUNNERS: htmlcs
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,21 @@ All inputs are **optional** except $WEBSITE_URL.
| `DISABLE_PR_STATS` | Prevent messaging to the pr results of test. | false |
| `TOKEN` | `GITHUB_TOKEN` (permissions `contents: write` and `pull-requests: write`) or a `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). | `GITHUB_TOKEN` |
| `A11YWATCH_TOKEN` | The A11yWatch API token to use to identify a user. | |
| `SLIM` | Use the gRPC client to gather reports - only displays stats, useful for large websites (no code generation, no outputs, just pure stats) | |
| `UPGRADE` | Upgrade the docker images before testing to latest. | |
| `SLIM` | Use the gRPC client to gather reports - only displays stats, useful for large websites (no code generation, no outputs, just pure stats) | false |
| `UPGRADE` | Upgrade the docker images before testing to latest. | false |
| `UPLOAD` | Upload the data as an artifact to get better insight. | false |

### Action Outputs

| Name | Description | Default |
| -------- | -------------------------- | ------- |
| `issues` | The amount of issues found | |

### ENV Variables

| Name | Description | Default |
| ----------------- | -------------------------------------------------------------------------------- | ------------ |
| `DEFAULT_RUNNERS` | A comma separeted list of runners to use for testing like `axe`, `htmlcs`, `ace` | `htmlcs,axe` |

## Performance

Expand All @@ -67,7 +73,7 @@ When `AI_DISABLED` is set to true the run for `A11yWatch` may increase.

## Common Issues

If you experience issues on your CI you may have to toggle the `UPGRADE` input to true in order to get the latest installs. If you see
If you experience issues on your CI you may have to toggle the `UPGRADE` input to true in order to get the latest installs. If you see
a playwright error try adding `PLAYWRIGHT_VERSION` env variable with the newest version to install chrome.

## CLI
Expand Down
16 changes: 16 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ inputs:
description: Upgrade the CLI to latest across runs.
required: false
default: false
UPLOAD:
description: Upload the audit as an artifact.
required: false
default: false
outputs:
issues:
description: "The amount of issues found on the page"
Expand Down Expand Up @@ -311,6 +315,18 @@ runs:
# shell: bash
# run: echo "recording_dir=$( echo "$(a11ywatch --find-tmp-dir)""/${{inputs.RECORD}}" )" >> $GITHUB_OUTPUT

- name: Get audit directory
id: a11ywatch-audit-directory
if: ${{ inputs.UPLOAD && inputs.UPLOAD != 'false' && (failure() || success()) }}
shell: bash
run: echo "audit_dir=$( echo "$(a11ywatch --find-results)" )" >> $GITHUB_OUTPUT

- uses: actions/upload-artifact@v3
if: ${{ inputs.UPLOAD && inputs.UPLOAD != 'false' && (failure() || success()) }}
with:
name: Audit Results
path: ${{ steps.a11ywatch-audit-directory.outputs.audit_dir }}

- uses: actions/upload-artifact@v3
if: ${{ inputs.RECORD && inputs.RECORD != 'false' && (failure() || success()) }}
with:
Expand Down
0