Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(SNP-1124): Update CI workflows #101

Merged
merged 3 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ labels: bug
-->

## Details

Flutter version: <!--android/ios/web/desktop-->

Dart version: <!--android/ios/web/desktop-->
Expand All @@ -50,9 +51,10 @@ What did you try to solve the problem?
-->

## Checklist for self-check

- [ ] Added expected and actual behavior.
- [ ] Added video or screenshot of bug.
- [ ] Added isolated way to reproduce the bug.
- [ ] Specified Flutter, Dart version and platforms.
- [ ] Attached error code and logs.
- [ ] All unspecified fields in the Issue description are deleted.
- [ ] All unspecified fields in the Issue description are deleted.
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/documentation_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ labels: documentation
Thank you for contributing to our project!
This template is only for documentation update reports, otherwise please use another template.
-->
## Specify package name
<!--Write the name of the package where you have problems-->

## Describe what scenario you think is uncovered by the existing examples / articles
<!--A clear and concise description of the problem that you want explained.-->

Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ labels: enhancement

Provide thoughtful commentary *and code samples* on what this feature means for your product. What will it allow you to do that you can't do today? How will it make current workarounds straightforward? What potential bugs and edge cases does it help to avoid? etc. Please keep it product-centric.
-->
## Specify package name
<!--Write the name of the package where you have problems-->

## What is the new or updated feature that you are suggesting?
<!--A clear and concise description of what you want to happen.-->

Expand Down
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Tap on "Preview" ⤴

And choose one of the templates:

* [Bugfix PR](?expand=1&template=bug_fix.md)
* [New feature PR](?expand=1&template=new_feature.md)
* [Documentation update PR](?expand=1&template=documentation_update.md)
* [Documentation update PR](?expand=1&template=documentation_update.md)
15 changes: 0 additions & 15 deletions .github/workflows/check_issue.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/main.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/new_issue_to_pyrus_task.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/workflows/new_issues_label.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/new_pull_request_label.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/new_pull_request_main_actions.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/on_close_issue_add_comment_to_pyrus_task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Add comment to Pyrus task on issue close

on:
issues:
types:
- closed

jobs:
get_pyrus_task_id:
name: Get Pyrus task ID from special comment in issue
uses: surfstudio/flutter-ci-workflows/.github/workflows/get_pyrus_task_id_from_issue_or_pr_comment.yml@main
with:
ISSUE_NUMBER: ${{ github.event.issue.number }}

add_comment_to_pyrus_task:
name: Add comment to Pyrus task
needs: get_pyrus_task_id
uses: surfstudio/flutter-ci-workflows/.github/workflows/add_comment_to_pyrus_task.yml@main
with:
PYRUS_TASK_ID: ${{ needs.get_pyrus_task_id.outputs.PYRUS_TASK_ID }}
COMMENT_TEXT: The issue is closed.
secrets:
LOGIN: ${{ secrets.PYRUS_BOT_LOGIN }}
SECURITY_KEY: ${{ secrets.PYRUS_BOT_SECRET_KEY }}
24 changes: 24 additions & 0 deletions .github/workflows/on_close_pr_add_comment_to_pyrus_task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Add comment to Pyrus task on PR close

on:
pull_request:
types:
- closed

jobs:
get_pyrus_task_id:
name: Get Pyrus task ID from special comment in issue
uses: surfstudio/flutter-ci-workflows/.github/workflows/get_pyrus_task_id_from_issue_or_pr_comment.yml@main
with:
ISSUE_NUMBER: ${{ github.event.pull_request.number }}

add_comment_to_pyrus_task:
name: Add comment to Pyrus task
needs: get_pyrus_task_id
uses: surfstudio/flutter-ci-workflows/.github/workflows/add_comment_to_pyrus_task.yml@main
with:
PYRUS_TASK_ID: ${{ needs.get_pyrus_task_id.outputs.PYRUS_TASK_ID }}
COMMENT_TEXT: The pull request is closed.
secrets:
LOGIN: ${{ secrets.PYRUS_BOT_LOGIN }}
SECURITY_KEY: ${{ secrets.PYRUS_BOT_SECRET_KEY }}
34 changes: 34 additions & 0 deletions .github/workflows/on_open_issue_create_pyrus_task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create Pyrus task from new issue

on:
issues:
types:
- opened
- reopened

jobs:
get_package_name:
uses: surfstudio/flutter-ci-workflows/.github/workflows/get_package_name.yml@main

create_pyrus_task:
name: Create Pyrus task from issue
needs: get_package_name
uses: surfstudio/flutter-ci-workflows/.github/workflows/create_pyrus_task_from_issue_or_pr.yml@main
with:
TYPE: Issue
PACKAGE_NAME: ${{ needs.get_package_name.outputs.package_name }}
TITLE: ${{ github.event.issue.title }}
LINK: ${{ github.event.issue.html_url }}
secrets:
LOGIN: ${{ secrets.PYRUS_BOT_LOGIN }}
SECURITY_KEY: ${{ secrets.PYRUS_BOT_SECRET_KEY }}

add_pyrus_task_link:
name: Add Pyrus task link
needs: create_pyrus_task
uses: surfstudio/flutter-ci-workflows/.github/workflows/add_comment_to_issue_or_pr.yml@main
with:
ISSUE_NUMBER: ${{ github.event.issue.number }}
# Don't change the comment link, because the Pyrus task ID is searched by the link text
COMMENT_TEXT: "[Link to Pyrus task](https://pyrus.com/t#id${{ needs.create_pyrus_task.outputs.TASK_ID }})"
REACTIONS: rocket
34 changes: 34 additions & 0 deletions .github/workflows/on_open_pr_create_pyrus_task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create Pyrus task from new PR

on:
pull_request:
types:
- opened
- reopened

jobs:
get_package_name:
uses: surfstudio/flutter-ci-workflows/.github/workflows/get_package_name.yml@main

create_pyrus_task:
name: Create Pyrus task from pull request
needs: get_package_name
uses: surfstudio/flutter-ci-workflows/.github/workflows/create_pyrus_task_from_issue_or_pr.yml@main
with:
TYPE: Pull request
PACKAGE_NAME: ${{ needs.get_package_name.outputs.package_name }}
TITLE: ${{ github.event.pull_request.title }}
LINK: ${{ github.event.pull_request.html_url }}
secrets:
LOGIN: ${{ secrets.PYRUS_BOT_LOGIN }}
SECURITY_KEY: ${{ secrets.PYRUS_BOT_SECRET_KEY }}

add_pyrus_task_link:
name: Add Pyrus task link
needs: create_pyrus_task
uses: surfstudio/flutter-ci-workflows/.github/workflows/add_comment_to_issue_or_pr.yml@main
with:
ISSUE_NUMBER: ${{ github.event.pull_request.number }}
# Don't change the comment link, because the Pyrus task ID is searched by the link text
COMMENT_TEXT: "[Link to Pyrus task](https://pyrus.com/t#id${{ needs.create_pyrus_task.outputs.TASK_ID }})"
REACTIONS: rocket
34 changes: 34 additions & 0 deletions .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: On pull request

on:
pull_request:

jobs:
get_flutter_version:
uses: surfstudio/flutter-ci-workflows/.github/workflows/get_flutter_version.yml@main

analysis:
needs: get_flutter_version
uses: surfstudio/flutter-ci-workflows/.github/workflows/analysis.yml@main
with:
FLUTTER_VERSION: ${{ needs.get_flutter_version.outputs.FLUTTER_VERSION }}

testing:
needs: [analysis, get_flutter_version]
uses: surfstudio/flutter-ci-workflows/.github/workflows/testing.yml@main
with:
FLUTTER_VERSION: ${{ needs.get_flutter_version.outputs.FLUTTER_VERSION }}
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

build_android_example:
needs: [analysis, get_flutter_version]
uses: surfstudio/flutter-ci-workflows/.github/workflows/build_android_example.yml@main
with:
FLUTTER_VERSION: ${{ needs.get_flutter_version.outputs.FLUTTER_VERSION }}

build_ios_example:
needs: [analysis, get_flutter_version]
uses: surfstudio/flutter-ci-workflows/.github/workflows/build_ios_example.yml@main
with:
FLUTTER_VERSION: ${{ needs.get_flutter_version.outputs.FLUTTER_VERSION }}
Loading
Loading