Skip to content

Commit

Permalink
Merge pull request #15 from tim-s-ccs/update-dm-govuk-frontend
Browse files Browse the repository at this point in the history
Update DM and GOV.UK Frontend
  • Loading branch information
tim-s-ccs authored Feb 14, 2024
2 parents 3cca00a + cc46df6 commit 6297575
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 52 deletions.
54 changes: 23 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,36 @@
name: Run tests
name: Test
on: [pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]

python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4

- name: Setup Python cache
uses: actions/cache@v4
with:
path: venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup Node cache
uses: actions/cache@v4
id: node-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup python (${{ matrix.python-version }})
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install Node version
shell: bash -l {0}
run: nvm install
- name: Install developer tools
run: make bootstrap

- name: Install developer tools
run: make bootstrap
- name: Install Node dependencies
run: invoke npm-install
if: steps.node-cache.outputs.cache-hit != 'true'

- name: Install dependencies
run: invoke requirements-dev
- name: Install dependencies
run: invoke requirements-dev
if: steps.python-cache.outputs.cache-hit != 'true'

- name: Run tests
run: invoke test
- name: Run tests
run: invoke test
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
'productName': productName,
'homepageUrl': '/',
'classes': adminAppClass,
'navigation': headerNavigation
'navigation': headerNavigation,
'useTudorCrown': True
})
}}
{% endmacro %}
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"author": "CCS",
"license": "MIT",
"devDependencies": {
"ccs-digitalmarketplace-govuk-frontend": "^5.1.2"
"ccs-digitalmarketplace-govuk-frontend": "^5.2.0"
}
}
8 changes: 4 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ccs-digitalmarketplace-apiclient==25.0.0
ccs-digitalmarketplace-utils==64.1.0
# via
# -r requirements.txt
# sanitized-package
# ccs-digitalmarketplace-frontend-jinja
certifi==2023.11.17
# via
# -r requirements.txt
Expand Down Expand Up @@ -100,10 +100,10 @@ govuk-country-register==0.5.0
# via
# -r requirements.txt
# ccs-digitalmarketplace-utils
govuk-frontend-jinja==2.7.0
govuk-frontend-jinja==2.8.0
# via
# -r requirements.txt
# sanitized-package
# ccs-digitalmarketplace-frontend-jinja
idna==3.6
# via
# -r requirements.txt
Expand All @@ -118,9 +118,9 @@ itsdangerous==1.1.0
jinja2==2.11.3
# via
# -r requirements.txt
# ccs-digitalmarketplace-frontend-jinja
# flask
# govuk-frontend-jinja
# sanitized-package
jmespath==1.0.1
# via
# -r requirements.txt
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cachelib==0.10.2
ccs-digitalmarketplace-apiclient==25.0.0
# via ccs-digitalmarketplace-utils
ccs-digitalmarketplace-utils==64.1.0
# via sanitized-package
# via ccs-digitalmarketplace-frontend-jinja
certifi==2023.11.17
# via requests
cffi==1.16.0
Expand Down Expand Up @@ -55,8 +55,8 @@ fleep==1.0.1
# via ccs-digitalmarketplace-utils
govuk-country-register==0.5.0
# via ccs-digitalmarketplace-utils
govuk-frontend-jinja==2.7.0
# via sanitized-package
govuk-frontend-jinja==2.8.0
# via ccs-digitalmarketplace-frontend-jinja
idna==3.6
# via requests
itsdangerous==1.1.0
Expand All @@ -65,9 +65,9 @@ itsdangerous==1.1.0
# flask-wtf
jinja2==2.11.3
# via
# ccs-digitalmarketplace-frontend-jinja
# flask
# govuk-frontend-jinja
# sanitized-package
jmespath==1.0.1
# via
# boto3
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
include_package_data=True,
install_requires=[
'jinja2<3',
'govuk-frontend-jinja>=2.7.0',
'govuk-frontend-jinja>=2.8.0,<3',
'ccs-digitalmarketplace-utils',
],
python_requires="~=3.9",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_render_component(client, component_name, macro_name, fixture_name, fixt
), f"Did not match for '{component_name}' component with example: '{fixture_name}'"


# Debugging test case for testing one component
# # Debugging test case for testing one component
# @pytest.mark.parametrize("macro_name, fixture_name, fixture_options, fixture_html", component_fixtures(''))
# def test_component(client, macro_name, fixture_name, fixture_options, fixture_html):
# component_name = ''
Expand All @@ -76,7 +76,7 @@ def test_render_component(client, component_name, macro_name, fixture_name, fixt
# ), f"Did not match for '{component_name}' component with example: '{fixture_name}'"


# Debugging test case for testing one component example
# # Debugging test case for testing one component example
# def test_individual_component(client):
# component_name = ''
# macro_name = component_name_to_macro_name(component_name)
Expand Down

0 comments on commit 6297575

Please sign in to comment.