Skip to content

[wip] Add Lighthouse in CI #206

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

Closed
wants to merge 8 commits into from
Closed
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
26 changes: 24 additions & 2 deletions .github/workflows/artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,30 @@ jobs:
runs-on: ubuntu-latest
name: Run CircleCI artifacts redirector
steps:
- name: GitHub Action step
uses: larsoner/circleci-artifacts-redirector-action@master
- name: Create URL for CircleCI artifact
id: redirect
# TODO: restore after https://github.com/larsoner/circleci-artifacts-redirector-action/pull/11
# uses: larsoner/circleci-artifacts-redirector-action@master
uses: bollwyvl/circleci-artifacts-redirector-action@add-url-output
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
artifact-path: 0/html/index.html
- name: Run Lighthouse on Site
id: lighthouse
uses: foo-software/lighthouse-check-action@master
with:
urls: ${{ steps.redirect.outputs.url }}
outputDirectory: /tmp/lighthouse
- name: Upload Lighthouse Reports
uses: actions/upload-artifact@master
with:
name: Lighthouse reports ${{ github.run_number }}
path: /tmp/artifacts
- name: Handle Lighthouse Check results
uses: foo-software/lighthouse-check-status-action@master
with:
lighthouseCheckResults: ${{ steps.lighthouse.outputs.lighthouseCheckResults }}
minAccessibilityScore: "98"
minBestPracticesScore: "53"
minPerformanceScore: "5"
minSeoScore: "93"
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
project = "PyData Sphinx Theme"
copyright = "2019, PyData Community"
author = "PyData Community"
language = "en"

# The full version, including alpha/beta/rc tags
release = "0.0.1dev0"
Expand Down
2 changes: 1 addition & 1 deletion pydata_sphinx_theme/docs-sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{%- include "search-field.html" %}
{% endif %}

<nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation">
<nav class="bd-links" id="bd-docs-nav" role="navigation" aria-label="{{ _('Main navigation') }}">

<div class="bd-toc-item active">
{% set nav = get_nav_object(maxdepth=3, collapse=True) %}
Expand Down
2 changes: 1 addition & 1 deletion pydata_sphinx_theme/docs-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
{%- endif %}

<nav id="bd-toc-nav">
<nav id="bd-toc-nav" role="navigation" aria-label="{{ _('Table of Contents') }}">
<ul class="nav section-nav flex-column">
{% for item in page_toc recursive %}
<li class="nav-item toc-entry toc-h{{ loop.depth + 1 }}">
Expand Down
8 changes: 5 additions & 3 deletions pydata_sphinx_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

{%- block extrahead %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="docsearch:language" content="en">
{% if language %}
<meta name="docsearch:language" content="{{ language }}">
{% endif %}
{%- endblock %}

{# Silence the sidebar's, relbar's #}
Expand All @@ -33,7 +35,7 @@
{%- endblock %}
{%- block content %}
{% block docs_navbar %}
<nav class="navbar navbar-light navbar-expand-lg bg-light fixed-top bd-navbar" id="navbar-main">
<nav class="navbar navbar-light navbar-expand-lg bg-light fixed-top bd-navbar" id="navbar-main" role="navigation" aria-label="{{ _('Site navigation') }}">
{%- include "docs-navbar.html" %}
</nav>
{% endblock %}
Expand Down Expand Up @@ -89,4 +91,4 @@

{%- block footer %}
{%- include "footer.html" %}
{%- endblock %}
{%- endblock %}