Skip to content

Commit

Permalink
Merge pull request #48 from ImperialCollegeLondon/template-ci-runners
Browse files Browse the repository at this point in the history
Allow users to opt into/out of different CI runners
  • Loading branch information
alexdewar authored Aug 5, 2024
2 parents 2ed7aaf + 3da4400 commit 64461a6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"use_bsd3_licence": false,
"add_precommit_workflows": true,
"automerge_bot_prs": false,
"use_windows_ci_runner": false,
"use_macos_ci_runner": false,
"__prompts__": {
"project_name": "Enter a human-readable name for the project",
"project_slug": "Enter a name for the Python package",
Expand All @@ -17,6 +19,8 @@
"packaging": "Select the Python packaging tool you wish to use",
"use_bsd3_licence": "Whether to use Imperial's default open-source licence (BSD 3-clause)",
"add_precommit_workflows": "Add Github Actions to run pre-commit hooks (only needed for private repositories)",
"use_windows_ci_runner": "Add a GitHub Actions runner for Windows (needed if your software targets Windows)",
"use_macos_ci_runner": "Add a GitHub Actions runner for macOS (needed if your software targets macOS - ARM)",
"automerge_bot_prs": "Whether to automatically merge PRs from bots including dependabot"
}
}
8 changes: 7 additions & 1 deletion {{ cookiecutter.project_slug }}/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os:
- ubuntu-latest
{%- if cookiecutter.use_windows_ci_runner %}
- windows-latest
{%- endif %}
{%- if cookiecutter.use_macos_ci_runner %}
- macos-latest{% endif %}
python-version: ["3.12"]

steps:
Expand Down

0 comments on commit 64461a6

Please sign in to comment.