Skip to content

Commit

Permalink
Remove v3-next branch requirement (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo authored Jul 11, 2024
1 parent e7bb7f3 commit 55f55ba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checkin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
check_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: "npm ci"
run: npm ci
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/selftest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,27 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Check on proper branch
if: github.head_ref != 'v3-next'
uses: actions/github-script@v3
with:
script: |
core.setFailed(`PRs for latest-stable must come from v2-next, but branch is ${{ github.head_ref }}`)

- name: Checkout
uses: actions/checkout@v2

- name: Setup stable
uses: alire-project/setup-alire@v3-next
uses: ./ # This uses the action code in the current PR
if: matrix.target == 'stable'
with:
cache: false
# We test without cache, as caching is tested in a separate workflow.
# This way we make sure the cache isn't hiding any issue.

- name: Setup nightly
uses: alire-project/setup-alire@v3-next
uses: ./
if: matrix.target == 'nightly'
with:
version: nightly
cache: false

- name: Setup from source (master)
uses: alire-project/setup-alire@v3-next
uses: ./
if: matrix.target == 'source'
with:
branch: master
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/test-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,14 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Check PR comes from proper branch
if: (github.head_ref || github.ref) != 'v3-next'
uses: actions/github-script@v3
with:
script: |
core.setFailed(`PRs for ${{github.base_ref}} must come from v3-next, but branch is ${{github.head_ref || github.ref}}`)
- name: Checkout
uses: actions/checkout@v2

# This might hit cache

- name: Check action itself (attempt 1)
id: attempt_1
uses: alire-project/setup-alire@v3-next
uses: ./
with:
version: ${{matrix.config.version}}
branch: ${{matrix.config.branch}}
Expand All @@ -52,14 +48,16 @@ jobs:
- name: Check action itself (attempt 2)
if: steps.attempt_1.outputs.cache_hit != 'true'
id: attempt_2
uses: alire-project/setup-alire@v3-next
uses: ./
with:
version: ${{matrix.config.version}}
branch: ${{matrix.config.branch}}

- shell: bash
- name: Diagnose cache use
shell: bash
run: |
echo Caching attempt 1: ${{steps.attempt_1.outputs.cache_hit}} :: Caching attempt 2: ${{steps.attempt_2.outputs.cache_hit}}
echo "Caching attempt 1: ${{steps.attempt_1.outputs.cache_hit}}"
echo "Caching attempt 2: ${{steps.attempt_2.outputs.cache_hit}}"
# Fail if no cache was hit
- if: (steps.attempt_1.outputs.cache_hit != 'true') && (steps.attempt_2.outputs.cache_hit != 'true')
Expand Down

0 comments on commit 55f55ba

Please sign in to comment.