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

Caskのテストをするactionsを統合する #13

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
272 changes: 0 additions & 272 deletions .github/workflows/ci-preview.yml

This file was deleted.

29 changes: 23 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

name: CI

on:
pull_request:
paths:
- Casks/voicevox.rb
Comment on lines -14 to -15
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Require status checks to pass before mergingの都合上すべてのPRで走らせる必要があるので制限を削除しました

on: pull_request

env:
HOMEBREW_DEVELOPER: 1
Expand All @@ -28,6 +25,23 @@ permissions:
contents: read

jobs:
get-changed-casks:
outputs:
changed-casks: ${{ steps.changed-casks.outputs.all_modified_files }}
runs-on: ubuntu-latest
steps:
- name: Check out Pull Request
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed casks
id: changed-casks
uses: tj-actions/[email protected]
with:
files: |
Casks/*.rb

generate-matrix:
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
Expand All @@ -54,7 +68,9 @@ jobs:

test:
name: ${{ matrix.name }}
needs: generate-matrix
needs:
- get-changed-casks
- generate-matrix
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -147,7 +163,8 @@ jobs:
run: |
brew audit --cask ${{ join(matrix.audit_args, ' ') }}${{ (matrix.cask && ' ') || ' --tap ' }}'${{ matrix.cask.token || matrix.tap }}'
timeout-minutes: 30
if: >
if: >-
contains(needs.get-changed-casks.outputs.changed-casks, 'Casks/voicevox.rb') &&
always() &&
contains(fromJSON('["success", "skipped"]'), steps.readall.outcome) &&
(!matrix.cask || steps.fetch.outcome == 'success') &&
Expand Down
Loading