Skip to content

Commit

Permalink
A hack to run Launchable on my forked repository.
Browse files Browse the repository at this point in the history
* Add a token to access Launchale.
* Remove the condition to run Launchable in only the ruby/ruby.
  • Loading branch information
junaruga committed Feb 19, 2024
1 parent 6fb37ef commit 7f94307
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ env:
LAUNCHABLE_WORKSPACE: ${{ github.event.repository.name }}
# https://github.com/launchableinc/cli/blob/v1.80.1/launchable/utils/authentication.py#L71
GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
# This setting only needs for forked repositories from the ruby/ruby.
LAUNCHABLE_TOKEN: ${{ secrets.LAUNCHABLE_TOKEN }}

concurrency:
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
Expand Down Expand Up @@ -107,7 +109,7 @@ jobs:
: # To avoid setting the same build name as the CI which runs on other branches, we use the branch name here.
launchable record build --name ${github_ref}_${GITHUB_PR_HEAD_SHA}
echo "TEST_WITH_LAUNCHABLE=--launchable-test-reports=${GITHUB_RUN_ID}.json" >> "$GITHUB_ENV"
if: ${{ github.repository == 'ruby/ruby' && (matrix.test_task == 'check' || matrix.test_task == 'test-all') }}
if: ${{ (matrix.test_task == 'check' || matrix.test_task == 'test-all') }}

- name: Set repeat-count option for make ${{ matrix.test_task }}
run: echo "TEST_WITH_LAUNCHABLE=$TEST_WITH_LAUNCHABLE --repeat-count=2" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -136,7 +138,7 @@ jobs:

- name: Launchable - record tests
run: launchable record tests --flavor os=${{ matrix.os }} --flavor test_task=${{ matrix.test_task }} raw ${GITHUB_RUN_ID}.json
if: ${{ always() && github.repository == 'ruby/ruby' && (matrix.test_task == 'check' || matrix.test_task == 'test-all') }}
if: ${{ always() && (matrix.test_task == 'check' || matrix.test_task == 'test-all') }}

- uses: ./.github/actions/slack
with:
Expand Down

0 comments on commit 7f94307

Please sign in to comment.