Skip to content

Commit

Permalink
add files to workflow for accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ella-deguzman authored Jan 11, 2025
1 parent a75788e commit a7950be
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Linters
on: [pull_request]
permissions:
contents: read
pull-requests: write
jobs:
pylint:
name: runner / pylint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dciborow/action-pylint@0.1.1
with:
github_token: ${{ secrets.github_token }}
# Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review].
reporter: github-pr-check
# Change reporter level if you need.
# GitHub Status Check won't become failure with warning.
level: warning
glob_pattern: "**/*.py"
filter_mode: nofilter
fail_on_error: true
pylint_args: "--disable=missing-module-docstring"

black:
name: runner / black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check files using the black formatter
uses: rickstaa/action-black@v1.3.3
id: action_black
with:
black_args: "."
fail_on_error: true
- name: Annotate diff changes using reviewdog
if: steps.action_black.outputs.is_formatted == 'true'
uses: reviewdog/action-suggester@v1
with:
tool_name: blackfmt
# NOTE: the reviewdog filter_mode is diff_context - this is the only thing supported by GitHub suggestions

markdownlint:
name: runner / markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: markdownlint
uses: reviewdog/action-markdownlint@v0.20.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
filter_mode: nofilter
fail_on_error: true
markdownlint_flags: "--disable MD013 MD041"

rubocop:
name: runner / rubocop
runs-on: ubuntu-latest
env:
BUNDLE_ONLY: rubocop
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: reviewdog/action-rubocop@v2
with:
reporter: github-pr-check
skip_install: true
use_bundler: true
filter_mode: nofilter
fail_on_error: true
34 changes: 34 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run all page tests

# Run when a PR is opened, any branch is pushed
# Also allow manually triggering workflows, and running if a release is created.
on:
- pull_request
- push
- workflow_dispatch
- deployment
- release

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
# The Ruby version is determined by either a `.ruby-version` or a `.tool-versions` file in root of the repo.
bundler-cache: true
- name: Run a11y tests
run: |
bundle exec rspec
- name: summary
if: failure()
run: ruby spec/support/spec_summary.rb
- name: Keep screenshots from failed tests
uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshots
path: ${{ github.workspace }}/tmp/capybara
if-no-files-found: ignore
retention-days: 7

0 comments on commit a7950be

Please sign in to comment.