ci(cli): パッケージラベルの生成ツールを追加 #640
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check-pr | |
on: | |
pull_request: | |
concurrency: | |
group: check-pr-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
changes: | |
uses: ./.github/workflows/wc-changes.yml | |
skip-comment: | |
runs-on: ubuntu-22.04 | |
needs: changes | |
if: ${{ needs.changes.outputs.any == 'false' }} | |
permissions: | |
pull-requests: write | |
timeout-minutes: 5 | |
steps: | |
# https://github.com/peter-evans/create-or-update-comment | |
- name: Comment | |
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
チェック対象ファイルの変更がなかったため、checkジョブをスキップしました | |
cache-dependencies: | |
runs-on: ubuntu-22.04 | |
needs: changes | |
if: ${{ needs.changes.outputs.dependencies == 'true' }} | |
timeout-minutes: 10 | |
steps: | |
# https://github.com/marketplace/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Setup Application Runtime | |
uses: ./.github/actions/setup-application-runtime | |
check: | |
needs: | |
- changes | |
- cache-dependencies | |
if: ${{ needs.changes.outputs.src == 'true' }} | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 20 | |
steps: | |
# https://github.com/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup Application Runtime | |
uses: ./.github/actions/setup-application-runtime | |
# https://github.com/invertase/github-action-dart-analyzer | |
- name: Report analyze | |
uses: invertase/github-action-dart-analyzer@e981b01a458d0bab71ee5da182e5b26687b7101b # v3.0.0 | |
with: | |
fatal-infos: true | |
- name: Check format | |
run: melos format --output none --set-exit-if-changed | |
- name: Run test | |
run: melos run report_test --no-select | |
continue-on-error: true | |
# https://github.com/andstor/file-existence-action | |
- name: Check file existence | |
id: check_files | |
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 | |
with: | |
# https://github.com/isaacs/node-glob の形式 | |
files: "**/test_report.log" | |
# https://github.com/dorny/test-reporter | |
- name: Report test | |
if: steps.check_files.outputs.files_exists == 'true' | |
uses: dorny/test-reporter@eaa763f6ffc21c7a37837f56cd5f9737f27fc6c8 # v1.8.0 | |
with: | |
name: "flutter test" | |
# https://github.com/mrmlnc/fast-glob の形式 | |
path: "(apps|packages)/**/test_report.log" | |
reporter: "flutter-json" | |
fail-on-error: "true" | |
# custom_lintが時間かかるのでcheckと並列させる | |
custom-lint: | |
needs: | |
- changes | |
- cache-dependencies | |
if: ${{ needs.changes.outputs.lint == 'true' }} | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 20 | |
steps: | |
# https://github.com/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup Application Runtime | |
uses: ./.github/actions/setup-application-runtime | |
- name: Report custom_lint result | |
run: | | |
echo "::add-matcher::.github/problem_matchers/custom_lint.json" | |
melos run report_custom_lint:ci --no-select || result=$? | |
echo "::remove-matcher owner=custom_lint::" | |
if [ -n "$result" ]; then | |
exit 1 | |
fi | |
diff-gen: | |
uses: ./.github/workflows/wc-check-diff.yaml | |
needs: | |
- changes | |
- cache-dependencies | |
if: ${{ needs.changes.outputs.gen == 'true' }} | |
markdown: | |
uses: ./.github/workflows/wc-check-markdown.yaml | |
needs: changes | |
if: ${{ needs.changes.outputs.markdown == 'true' }} | |
status-check: | |
runs-on: ubuntu-22.04 | |
needs: | |
- check | |
- custom-lint | |
- diff-gen | |
- markdown | |
permissions: { } | |
if: failure() | |
steps: | |
- run: exit 1 |