mirror of
https://github.com/django/django.git
synced 2025-03-31 19:46:42 +00:00
Add accessibility github action workflow
This commit is contained in:
parent
1dae65dc63
commit
bd69bd6ab6
53
.github/workflows/accessibility.yml
vendored
Normal file
53
.github/workflows/accessibility.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: Accessibility
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "poc-ci-accessibility"
|
||||||
|
- main
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
accessibility:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_BD: postgres
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "16"
|
||||||
|
- name: Install Requirements
|
||||||
|
run: python -m pip install .
|
||||||
|
- name: Cache Django
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: Django/*
|
||||||
|
key: Django
|
||||||
|
- name: Create dummy app
|
||||||
|
run: |
|
||||||
|
django-admin startproject allyapp
|
||||||
|
python allyapp/manage.py migrate
|
||||||
|
- name: Install pa11y
|
||||||
|
run: npm install -g pa11y
|
||||||
|
- name: Run the project and pa11y
|
||||||
|
run: python allyapp/manage.py runserver & (sleep 10 && pa11y http://127.0.0.1:8000/ --runner axe)
|
9
.pa11y.json
Normal file
9
.pa11y.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"defaults": {
|
||||||
|
"timeout": 10000
|
||||||
|
},
|
||||||
|
"urls": [
|
||||||
|
"http://127.0.0.1:8000/",
|
||||||
|
"http://127.0.0.1:8000/admin/"
|
||||||
|
]
|
||||||
|
}
|
9
.pa11yci
Normal file
9
.pa11yci
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"defaults": {
|
||||||
|
"timeout": 10000
|
||||||
|
},
|
||||||
|
"urls": [
|
||||||
|
"http://127.0.0.1:8000/",
|
||||||
|
"http://127.0.0.1:8000/admin/"
|
||||||
|
]
|
||||||
|
}
|
8
Dockerfile
Normal file
8
Dockerfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM python:3.10-buster
|
||||||
|
EXPOSE 8000
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . /app
|
||||||
|
RUN python -m pip install .
|
||||||
|
RUN django-admin startproject allyapp
|
||||||
|
ENTRYPOINT ["python3"]
|
||||||
|
CMD ["allyapp/manage.py", "runserver", "0.0.0.0:8000"]
|
Loading…
x
Reference in New Issue
Block a user