Skip to content

Commit

Permalink
Try with multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelotl committed Jul 16, 2024
1 parent 8e68034 commit fa40563
Show file tree
Hide file tree
Showing 4 changed files with 3,399 additions and 3,372 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,30 @@ def generate_test_workflow(
*operating_systems
) -> None:

jobs = get_test_jobs_data(get_tox_envs(tox_ini_path), operating_systems)

with (
open(workflow_directory_path.joinpath("test.yml"), "w") as
open(workflow_directory_path.joinpath("test_0.yml"), "w") as
test_yml_file
):
test_yml_file.write(
Environment(
loader=FileSystemLoader(Path(__file__).parent)
).get_template("test.yml.j2").render(
jobs=get_test_jobs_data(
get_tox_envs(tox_ini_path), operating_systems
)
jobs=jobs[:250], file_number=0
)
)
test_yml_file.write("\n")

with (
open(workflow_directory_path.joinpath("test_1.yml"), "w") as
test_yml_file
):
test_yml_file.write(
Environment(
loader=FileSystemLoader(Path(__file__).parent)
).get_template("test.yml.j2").render(
jobs=jobs[250:], file_number=1
)
)
test_yml_file.write("\n")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Do not edit this file.
# This file is generated automatically by executing tox -e generate_workflows

name: Test
name: Test {{ file_number }}

on:
push:
Expand Down
Loading

0 comments on commit fa40563

Please sign in to comment.