GOV.UK Frontend 5.13.0 #348
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Python package | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| # Checkout the repo | |
| - uses: actions/checkout@v4 | |
| # Set up Python via setup-python | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # Install pipenv and dependencies from Pipfile.lock | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip pipenv | |
| pipenv install --dev --deploy --ignore-pipfile | |
| # Security check | |
| - name: Check dependencies for known vulnerabilities | |
| run: pipenv run pip-audit | |
| # Linting | |
| - name: Lint with flake8 | |
| run: | | |
| pipenv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| pipenv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics | |
| # Prepare external test tools | |
| - name: Prepare test tools | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y wait-for-it curl | |
| curl -L https://github.com/matthew-shaw/govuk-frontend-diff/releases/download/v2.0.0/govuk-frontend-diff-linux \ | |
| --output govuk-frontend-diff | |
| chmod +x ./govuk-frontend-diff | |
| # Run Flask test server and govuk-frontend-diff | |
| - name: Run tests with govuk-frontend-diff | |
| run: | | |
| (cd tests/utils && nohup pipenv run python -m flask run --port 3000 &) | |
| wait-for-it localhost:3000 | |
| ./govuk-frontend-diff http://localhost:3000 --govuk-frontend-version=v5.13.0 --exclude page-template --ci |