diff --git a/.github/workflows/accessibility.yml b/.github/workflows/accessibility.yml new file mode 100644 index 0000000000..11ac03ff8c --- /dev/null +++ b/.github/workflows/accessibility.yml @@ -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) diff --git a/.pa11y.json b/.pa11y.json new file mode 100644 index 0000000000..bbb5feec3d --- /dev/null +++ b/.pa11y.json @@ -0,0 +1,9 @@ +{ + "defaults": { + "timeout": 10000 + }, + "urls": [ + "http://127.0.0.1:8000/", + "http://127.0.0.1:8000/admin/" + ] +} \ No newline at end of file diff --git a/.pa11yci b/.pa11yci new file mode 100644 index 0000000000..bbb5feec3d --- /dev/null +++ b/.pa11yci @@ -0,0 +1,9 @@ +{ + "defaults": { + "timeout": 10000 + }, + "urls": [ + "http://127.0.0.1:8000/", + "http://127.0.0.1:8000/admin/" + ] +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..8e315d5c36 --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file