Skip to content

Commit 45c49f0

Browse files
authored
feat: list environment variables in workflow definition (#294)
1 parent 66d84b9 commit 45c49f0

File tree

2 files changed

+9
-2
lines changed
  • template/{% if ci == 'github' %}.github{% endif %}/workflows
  • {{ cookiecutter.__project_name_kebab_case }}/.github/workflows

2 files changed

+9
-2
lines changed

template/{% if ci == 'github' %}.github{% endif %}/workflows/test.yml.jinja

+6-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ jobs:
3636
- name: Start Dev Container
3737
run: |
3838
git config --global init.defaultBranch main
39-
PYTHON_VERSION={% raw %}${{{% endraw %} matrix.python-version }}{% if project_type == 'package' %} RESOLUTION_STRATEGY={% raw %}${{{% endraw %} matrix.resolution-strategy }}{% endif %} devcontainer up --workspace-folder .
39+
devcontainer up --workspace-folder .
40+
env:
41+
PYTHON_VERSION: {% raw %}${{{% endraw %} matrix.python-version }}
42+
{%- if project_type == 'package' %}
43+
RESOLUTION_STRATEGY: {% raw %}${{{% endraw %} matrix.resolution-strategy }}
44+
{%- endif %}
4045

4146
- name: Lint {{ project_type }}
4247
run: devcontainer exec --workspace-folder . poe lint

{{ cookiecutter.__project_name_kebab_case }}/.github/workflows/test.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ jobs:
3333
- name: Start Dev Container
3434
run: |
3535
git config --global init.defaultBranch main
36-
PYTHON_VERSION={% raw %}${{{% endraw %} matrix.python-version }} devcontainer up --workspace-folder .
36+
devcontainer up --workspace-folder .
37+
env:
38+
PYTHON_VERSION: {% raw %}${{{% endraw %} matrix.python-version }}
3739

3840
- name: Lint {{ cookiecutter.project_type }}
3941
run: devcontainer exec --workspace-folder . poe lint

0 commit comments

Comments
 (0)