Skip to content

Commit

Permalink
Install node in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nmenezes0 committed Mar 18, 2024
1 parent 74a4ebe commit e757f01
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- 5432:5432

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: install python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.12"

Expand All @@ -49,8 +49,18 @@ jobs:
DJANGO_SECRET_KEY: dummy-key
DATABASE_URL: psql://pguser:pgpass@postgres:5432/consultations_test

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '14'

- name: Install dependencies
run: npm install

- name: pytest
run: poetry run pytest
run:
# poetry run python manage.py collectstatic --noinput
poetry run pytest
env:
DATABASE_URL: psql://pguser:pgpass@postgres:5432/consultations_test

Expand Down
15 changes: 0 additions & 15 deletions consultation_analyser/consultations/jinja2/question-summary.html

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
{{ question.text }}
{% extends "base.html" %}

{% block content %}
<h1 class="govuk-heading-xl">Question</h1>

{% endblock %}
2 changes: 1 addition & 1 deletion consultation_analyser/consultations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ def show_question(request: HttpRequest, consultation_slug: str, section_slug: st
themes_for_question = models.Theme.objects.filter(answer__question=question)
# TODO - probably want counts etc.
context = {"question": question, "themes": themes_for_question}
return render(request, "question-summary.html", context)
return render(request, "show_question.html", context)
2 changes: 1 addition & 1 deletion tests/integration/test_question_pages.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from tests.factories import QuestionFactory
from tests.factories import AnswerFactory
from tests import factories


Expand Down

0 comments on commit e757f01

Please sign in to comment.