Skip to content

Commit

Permalink
[Example][Fundamental] Fix missing ignore path for some code paths in…
Browse files Browse the repository at this point in the history
… template (#1403)

# Description

This PR targets to exclude `examples/flows/integration` folder for all
autogen workflow YAMLs.

# All Promptflow Contribution checklist:
- [x] **The pull request does not introduce [breaking changes].**
- [ ] **CHANGELOG is updated for new features, bug fixes or other
significant changes.**
- [x] **I have read the [contribution guidelines](../CONTRIBUTING.md).**
- [ ] **Create an issue and link to the pull request to get dedicated
review from promptflow team. Learn more: [suggested
workflow](../CONTRIBUTING.md#suggested-workflow).**

## General Guidelines and Best Practices
- [x] Title of the pull request is clear and informative.
- [x] There are a small number of commits, each of which have an
informative message. This means that previously merged commits do not
appear in the history of the PR. For more information on cleaning up the
commits in your PR, [see this
page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md).

### Testing Guidelines
- [x] Pull request includes test coverage for the included changes.
  • Loading branch information
zhengfeiwang authored Dec 7, 2023
1 parent 449d679 commit 5c75f58
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/samples_connections_connection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- cron: "13 22 * * *" # Every day starting at 6:13 BJT
pull_request:
branches: [ main ]
paths: [ examples/connections/**, examples/*requirements.txt, .github/workflows/samples_connections_connection.yml ]
paths: [ examples/connections/**, examples/*requirements.txt, .github/workflows/samples_connections_connection.yml, '!examples/flows/integrations/**' ]
workflow_dispatch:

env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- cron: "12 21 * * *" # Every day starting at 5:12 BJT
pull_request:
branches: [ main ]
paths: [ examples/flows/chat/chat-with-pdf/**, examples/*requirements.txt, .github/workflows/samples_flows_chat_chatwithpdf_chatwithpdf.yml ]
paths: [ examples/flows/chat/chat-with-pdf/**, examples/*requirements.txt, .github/workflows/samples_flows_chat_chatwithpdf_chatwithpdf.yml, '!examples/flows/integrations/**' ]
workflow_dispatch:

env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- cron: "44 20 * * *" # Every day starting at 4:44 BJT
pull_request:
branches: [ main ]
paths: [ examples/flows/chat/chat-with-pdf/**, examples/*requirements.txt, .github/workflows/samples_flows_chat_chatwithpdf_chatwithpdfazure.yml ]
paths: [ examples/flows/chat/chat-with-pdf/**, examples/*requirements.txt, .github/workflows/samples_flows_chat_chatwithpdf_chatwithpdfazure.yml, '!examples/flows/integrations/**' ]
workflow_dispatch:

env:
Expand Down
2 changes: 1 addition & 1 deletion scripts/readme/ghactions_driver/readme_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def write_workflow(
schedule_hour = (name_hash // 60) % 4 + 19 # 19-22 UTC

if "tutorials" in workflow_name:
path_filter = f"[ examples/**, .github/workflows/{workflow_name}.yml ]"
path_filter = f"[ examples/**, .github/workflows/{workflow_name}.yml, '!examples/flows/integrations/**' ]"
else:
if "web_classification" in workflow_name:
path_filter = (
Expand Down
5 changes: 4 additions & 1 deletion scripts/readme/workflow_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def write_notebook_workflow(notebook, name, output_telemetry=Telemetry()):
if "tutorials" in gh_working_dir:
path_filter = f"[ examples/**, .github/workflows/{workflow_name}.yml, '!examples/flows/integrations/**' ]"
else:
path_filter = f"[ {gh_working_dir}/**, examples/*requirements.txt, .github/workflows/{workflow_name}.yml ]"
path_filter = (
f"[ {gh_working_dir}/**, examples/*requirements.txt, .github/workflows/{workflow_name}.yml, "
"'!examples/flows/integrations/**' ]"
)

if "chatwithpdf" in workflow_name:
template_pdf = env.get_template("pdf_workflow.yml.jinja2")
Expand Down

0 comments on commit 5c75f58

Please sign in to comment.