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

Remove v3-next branch requirement #72

Merged
merged 1 commit into from
Jul 11, 2024
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
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
Loading