-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial version of
copier-bootstrap
- Loading branch information
Showing
29 changed files
with
280 additions
and
0 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,57 @@ | ||
name: Test & release | ||
|
||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
|
||
jobs: | ||
pre-commit: | ||
name: Run `pre-commit` | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- uses: pre-commit/[email protected] | ||
test: | ||
name: Run approval tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # `copier` prefers full-history clones | ||
submodules: true | ||
- name: Debug on runner (When re-run with "Enable debug logging" checked) | ||
if: runner.debug | ||
uses: mxschmitt/action-tmate@v3 | ||
with: | ||
detached: true | ||
- name: Install test dependencies | ||
run: | | ||
pipx install copier | ||
pipx install texttest | ||
- name: Run `texttest` | ||
run: texttest -b | ||
results: | ||
name: Collect results | ||
needs: | ||
- pre-commit | ||
- test | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: codfish/semantic-release-action@v3 | ||
with: | ||
plugins: | | ||
[ "@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github" | ||
] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "base"] | ||
path = base | ||
url = https://github.com/dafyddj/base-bootstrap |
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,17 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.27.3 | ||
hooks: | ||
- id: check-github-workflows | ||
name: Check GitHub workflows with check-jsonschema | ||
args: ["--verbose"] | ||
- id: check-renovate | ||
name: Check Renovate config with check-jsonschema | ||
args: ["--verbose"] |
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,10 @@ | ||
#!/bin/bash | ||
|
||
# Check if the copier binary exists | ||
if ! [ -x "$(command -v copier)" ]; then | ||
echo "Error: 'copier' binary not found or not executable" | ||
exit 1 | ||
fi | ||
|
||
# Call the copier binary with all command line arguments | ||
copier "$@" |
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 @@ | ||
_subdirectory: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Test & release | ||
|
||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }} | ||
|
||
jobs: | ||
pre-commit: | ||
name: Run `pre-commit` | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
- uses: pre-commit/[email protected] | ||
test: | ||
name: Run approval tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # `copier` prefers full-history clones | ||
submodules: true | ||
- name: Debug on runner (When re-run with "Enable debug logging" checked) | ||
if: runner.debug | ||
uses: mxschmitt/action-tmate@v3 | ||
with: | ||
detached: true | ||
- name: Install test dependencies | ||
run: | | ||
pipx install copier | ||
pipx install texttest | ||
- name: Run `texttest` | ||
run: texttest -b | ||
results: | ||
name: Collect results | ||
needs: | ||
- pre-commit | ||
- test | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: codfish/semantic-release-action@v3 | ||
with: | ||
plugins: | | ||
[ "@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github" | ||
] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.27.3 | ||
hooks: | ||
- id: check-github-workflows | ||
name: Check GitHub workflows with check-jsonschema | ||
args: ["--verbose"] | ||
- id: check-renovate | ||
name: Check Renovate config with check-jsonschema | ||
args: ["--verbose"] |
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,10 @@ | ||
#!/bin/bash | ||
|
||
# Check if the copier binary exists | ||
if ! [ -x "$(command -v copier)" ]; then | ||
echo "Error: 'copier' binary not found or not executable" | ||
exit 1 | ||
fi | ||
|
||
# Call the copier binary with all command line arguments | ||
copier "$@" |
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 @@ | ||
_subdirectory: template |
Empty file.
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,3 @@ | ||
The following new files/directories were created: | ||
<Test Directory> | ||
----.gitkeep |
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 @@ | ||
$TEXTTEST_ROOT/.. . |
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,6 @@ | ||
/opt/homebrew/Cellar/copier/9.1.0/libexec/lib/python3.12/site-packages/copier/vcs.py:199: DirtyLocalWarning: Dirty template changes included automatically. | ||
warn( | ||
|
||
Copying from template version 0.0.0.post2.dev0+30f8eb2 | ||
[36m identical[39m[0m . | ||
[32m[1m create[39m[0m .gitkeep |
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,2 @@ | ||
|
||
|
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,16 @@ | ||
# Full path to the System Under Test (or Java Main Class name) | ||
executable:${TEXTTEST_ROOT}/../bin/copier | ||
|
||
# Naming scheme to use for files for stdin,stdout and stderr | ||
filename_convention_scheme:standard | ||
|
||
# Expanded name to use for application | ||
full_name:Copier Test | ||
|
||
create_catalogues:true | ||
|
||
[run_dependent_text] | ||
stderr:Copying from template version | ||
stderr:DirtyLocalWarning{LINES 2} | ||
stderr:No git tags found in template; using HEAD as ref | ||
|
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 @@ | ||
copy --vcs-ref=HEAD |
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 @@ | ||
GenerateProject |
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,2 @@ | ||
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY | ||
{{ _copier_answers|to_nice_yaml -}} |
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,21 @@ | ||
The following new files/directories were created: | ||
<Test Directory> | ||
----.copier-answers.yml | ||
----.github | ||
--------workflows | ||
------------main.yml | ||
----.pre-commit-config.yaml | ||
----bin | ||
--------copier | ||
----copier.yaml | ||
----template | ||
--------.gitkeep | ||
----test | ||
--------config.tt | ||
--------options.tt | ||
--------testsuite.tt | ||
--------GenerateProject | ||
------------catalogue.tt | ||
------------options.tt | ||
------------stderr.tt | ||
------------stdout.tt |
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 @@ | ||
../../base/test/config.tt |
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 @@ | ||
../../base/.github/workflows/main.yml |
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 @@ | ||
$TEXTTEST_ROOT/.. . |
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 @@ | ||
../../base/.pre-commit-config.yaml |
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,24 @@ | ||
/opt/homebrew/Cellar/copier/9.1.0/libexec/lib/python3.12/site-packages/copier/vcs.py:199: DirtyLocalWarning: Dirty template changes included automatically. | ||
warn( | ||
|
||
Copying from template version 0.0.0.post2.dev0+598ea99 | ||
[36m identical[39m[0m . | ||
[32m[1m create[39m[0m .copier-answers.yml | ||
[32m[1m create[39m[0m test | ||
[32m[1m create[39m[0m test/testsuite.tt | ||
[32m[1m create[39m[0m test/config.tt | ||
[32m[1m create[39m[0m test/GenerateProject | ||
[32m[1m create[39m[0m test/GenerateProject/catalogue.tt | ||
[32m[1m create[39m[0m test/GenerateProject/stdout.tt | ||
[32m[1m create[39m[0m test/GenerateProject/stderr.tt | ||
[32m[1m create[39m[0m test/GenerateProject/options.tt | ||
[32m[1m create[39m[0m test/options.tt | ||
[32m[1m create[39m[0m bin | ||
[32m[1m create[39m[0m bin/copier | ||
[32m[1m create[39m[0m .pre-commit-config.yaml | ||
[32m[1m create[39m[0m copier.yaml | ||
[32m[1m create[39m[0m template | ||
[32m[1m create[39m[0m template/.gitkeep | ||
[32m[1m create[39m[0m .github | ||
[32m[1m create[39m[0m .github/workflows | ||
[32m[1m create[39m[0m .github/workflows/main.yml |
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,2 @@ | ||
|
||
|
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,21 @@ | ||
# Full path to the System Under Test (or Java Main Class name) | ||
executable:${TEXTTEST_ROOT}/../bin/copier | ||
|
||
# Naming scheme to use for files for stdin,stdout and stderr | ||
filename_convention_scheme:standard | ||
|
||
# Expanded name to use for application | ||
full_name:Copier Test | ||
|
||
create_catalogues:true | ||
|
||
[collate_file] | ||
config_tt:test/config.tt | ||
main_yml:.github/workflows/main.yml | ||
pre-commit_yaml:.pre-commit-config.yaml | ||
|
||
[run_dependent_text] | ||
stderr:Copying from template version | ||
stderr:DirtyLocalWarning{LINES 2} | ||
stderr:No git tags found in template; using HEAD as ref | ||
|
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 @@ | ||
copy --vcs-ref=HEAD |
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 @@ | ||
GenerateProject |