-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add: Add gitlab and github workflows. Also remove GDS question and GDS files #85
Open
joshlynchONS
wants to merge
28
commits into
main
Choose a base branch
from
add_ci
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
ff55181
add: add basic github workflow file to package
joshlynchONS e12a7f4
fix: add workflow directories to env variables
joshlynchONS d5f4ae8
fix: escape jinja templating in the package_build workflow
joshlynchONS 05fcffb
fix: fix syntax of jinja escape
joshlynchONS 7dda5e5
fix: jinja escape syntax
joshlynchONS 1356d0a
fix: jinja escape syntax
joshlynchONS 89c897f
fix: fix the syntax for jinja escape on all matrix defs
joshlynchONS 67359d5
add: add gitlab ci file
joshlynchONS eef7c44
add: add condition on python specific files
joshlynchONS 017726a
fix: add conditions on the Github and gitlab files
joshlynchONS c2ae1ec
fix: fix injected variable count
joshlynchONS cab188b
fix: fix docker image for ons gitlab ci
joshlynchONS 166f44f
fix: add extra cookiecutter question for in ons or not
joshlynchONS 01b3063
chore: update cookiecutter var name for ons git
joshlynchONS 4792760
chore: update workflow file name
joshlynchONS 15a0481
fix: replace GDS question for ONS question for gitlab ci
joshlynchONS 841a78b
remove: remove tests for aqa framework
joshlynchONS c2fd7a7
fix: move workflow templates for gitlab and github
joshlynchONS a2179ed
fix: add gitlab dir in envs and remove no longer required tests
joshlynchONS 4cf5b1d
remove: remove organisational framework docs
joshlynchONS 210067b
docs: remove organisational framework references from docs
joshlynchONS cbb2a3f
fix: add .gitlab to manifest.json to remove if chose github
joshlynchONS da34c6b
fix: rename pull request template for github
joshlynchONS 447f092
fix: pre-commit error in gitlab-ci file
joshlynchONS d61c553
fix: pre-commit format error
joshlynchONS 607f411
fix: revert gitlab ci format
joshlynchONS fc5d02b
fix: resolve merge conflicts with main
joshlynchONS a84f969
fix: update init.py style to match isort
joshlynchONS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
"repository_hosting_platform": ["GitHub", "GitLab"], | ||
"organisation_handle": "Your GitHub/GitLab organisation name, for example ukgovdatascience", | ||
"contact_email": "[email protected]", | ||
"organisational_framework": ["GDS", "N/A"], | ||
"organisational_framework": ["ONS", "N/A"], | ||
|
||
"project_name": "Your new project name", | ||
"repo_name": "{{ cookiecutter.project_name.lower().replace(' ', '_').replace('-', '_') }}", | ||
|
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
2 changes: 0 additions & 2 deletions
2
... cookiecutter.repo_name }}/.govcookiecutter/organisational_frameworks/README.md
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,15 +1,8 @@ | ||
from hooks.post_gen_project import ( | ||
delete_files_and_folders, | ||
parse_features_json, | ||
set_aqa_framework, | ||
set_request_template, | ||
) | ||
from hooks.post_gen_project import delete_files_and_folders, parse_features_json | ||
from hooks.pre_gen_project import check_valid_email_address_format | ||
|
||
__all__ = ( | ||
"delete_files_and_folders", | ||
"check_valid_email_address_format", | ||
"parse_features_json", | ||
"set_aqa_framework", | ||
"set_request_template", | ||
) |
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 |
---|---|---|
|
@@ -5,45 +5,6 @@ | |
from sphinx.cmd.build import main | ||
|
||
|
||
@pytest.mark.parametrize("test_input_repository_hosting_platform", ["GitHub", "GitLab"]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why has this been removed? |
||
@pytest.mark.parametrize("test_input_project_name", ["A project", "Another project"]) | ||
@pytest.mark.parametrize("test_input_using_r", ["Yes", "No"]) | ||
def test_request_template_generated_correctly( | ||
cookies, | ||
test_input_repository_hosting_platform: str, | ||
test_input_project_name: str, | ||
test_input_using_r: str, | ||
) -> None: | ||
"""Test the pull or merge request templates are created correctly.""" | ||
|
||
# Create a new project adding extra context; return it's `project_path` attribute | ||
test_output_project = cookies.bake( | ||
extra_context={ | ||
"repository_hosting_platform": test_input_repository_hosting_platform, | ||
"project_name": test_input_project_name, | ||
"using_R": test_input_using_r, | ||
} | ||
) | ||
|
||
# Check that the build passes | ||
assert test_output_project.exit_code == 0 | ||
assert test_output_project.exception is None | ||
|
||
# Define the path to the pull or merge request template | ||
test_output = test_output_project.project_path | ||
if test_input_repository_hosting_platform == "GitHub": | ||
assert test_output.joinpath(".github", "pull_request_template.md").is_file() | ||
elif test_input_repository_hosting_platform == "GitLab": | ||
assert test_output.joinpath( | ||
".gitlab", "merge_request_templates", f"{test_input_project_name}.md" | ||
).is_file() | ||
else: | ||
pytest.fail( | ||
"Unknown `repository_hosting_platform` value: " | ||
f"{test_input_repository_hosting_platform}" | ||
) | ||
|
||
|
||
@pytest.mark.skip( | ||
reason="Unclear how to test this, unless there is a title in each " "framework" | ||
) | ||
|
@@ -101,7 +62,7 @@ def test_repo_name_directory_correct( | |
|
||
@pytest.mark.parametrize("test_input_context", args_builds_correctly) | ||
@pytest.mark.parametrize("test_input_repository_hosting_platform", ["GitHub", "GitLab"]) | ||
@pytest.mark.parametrize("test_input_organisational_framework", ["GDS", "N/A"]) | ||
@pytest.mark.parametrize("test_input_organisational_framework", ["ONS", "N/A"]) | ||
@pytest.mark.parametrize("test_input_using_r", ["No", "Yes"]) | ||
def test_builds_correctly( | ||
cookies, | ||
|
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You removed these scripts. Do we need to adjust them rather than remove them completely?