This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
forked from XGovFormBuilder/digital-form-builder
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
180 additions
and
64 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Test and Tag Python tools | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- "python/**" # Trigger only on changes in the "python" directory | ||
|
||
jobs: | ||
run-unit-tests: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Change working directory to python | ||
run: cd python | ||
|
||
- name: Setup python | ||
id: setup_python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Run tests | ||
run: | | ||
python -m venv .venv | ||
source .venv/bin/activate && python -m pip install --upgrade pip && pip install -r python/requirements.txt | ||
pytest python/tests | ||
create-release: | ||
runs-on: ubuntu-latest | ||
needs: run-unit-tests | ||
if: github.ref == 'refs/heads/main' | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Change working directory to python | ||
run: cd python | ||
|
||
- name: Setup python | ||
id: setup_python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Get package version | ||
id: package_version | ||
run: echo "app_version="$(python setup.py --version) >> $GITHUB_OUTPUT | ||
|
||
- name: Check if tag exists | ||
uses: mukunku/tag-exists-action@v1.0.0 | ||
id: check_tag | ||
with: | ||
tag: ${{ steps.package_version.outputs.app_version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: ncipollo/release-action@v1 | ||
name: Create Release | ||
id: create_release | ||
if: ${{ steps.check_tag.outputs.exists == 'false' }} | ||
with: | ||
commit: main | ||
tag: ${{ steps.package_version.outputs.app_version }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-release: | ||
runs-on: ubuntu-latest | ||
needs: create-release | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Change working directory to python | ||
run: cd python | ||
|
||
- name: Setup python | ||
id: setup_python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Build for publish | ||
id: build_dist | ||
run: | | ||
python -m pip install --upgrade pip && pip install build | ||
python -m build | ||
echo workspace dir $GITHUB_WORKSPACE | ||
- name: Publish to PyPI | ||
id: publish-to-pypi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "funding-service-design-digital-form-builder-tools" | ||
version = "0.0.1" | ||
authors = [ | ||
{ name="DLUHC", email="FundingServiceDesignTeam@levellingup.gov.uk" }, | ||
] | ||
description = "Python tools for our fork of the digital-form-builder" | ||
readme = "README.md" | ||
license = { file = "LICENSE" } | ||
requires-python = ">=3.10" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
] | ||
|
||
[dependencies] | ||
beautifulsoup4 = "4.12.2" | ||
|
||
|
||
[project.urls] | ||
"Bug Tracker" = "https://github.com/tferns/fsd-digital-form-builder-tools/issues" | ||
"Homepage" = "https://github.com/tferns/fsd-digital-form-builder-tools" |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
from setuptools import find_packages | ||
from setuptools import setup | ||
|
||
setup() | ||
package_data = {"": ["*"]} | ||
|
||
setup_kwargs = { | ||
"packages": find_packages(), | ||
"package_data": package_data, | ||
} | ||
|
||
setup(**setup_kwargs) |
This file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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 file contains 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