mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-22 22:56:07 +00:00
New option to work with one or more hex.pm mirrors (#197)
* New option to work with one or more hex.pm mirrors Add a new option called `hexpm-mirrors` for one or more hex.pm mirrors. Default list is `builds.hex.pm`, so behavior is unaffected unless option is used. Signed-off-by: Paul Guyot <pguyot@kallisys.net> * Implement suggested rewording changes from @paulo-ferraz-oliveira Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com> Signed-off-by: Paul Guyot <pguyot@kallisys.net> --------- Signed-off-by: Paul Guyot <pguyot@kallisys.net> Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
---
|
||||
name: hexpm-mirrors
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test-failing-first-mirror:
|
||||
name: Test option hexpm-mirrors with a dummy first mirror
|
||||
runs-on: ${{matrix.os}}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ['ubuntu-22.04', 'windows-2022']
|
||||
otp-version: ['24']
|
||||
elixir-version: ['v1.14', '']
|
||||
install-rebar: [true, false]
|
||||
install-hex: [true, false]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use erlef/setup-beam
|
||||
id: setup-beam
|
||||
uses: ./
|
||||
with:
|
||||
otp-version: ${{matrix.otp-version}}
|
||||
elixir-version: ${{matrix.elixir-version}}
|
||||
install-rebar: ${{matrix.install-rebar}}
|
||||
install-hex: ${{matrix.install-hex}}
|
||||
hexpm-mirrors: |
|
||||
https://mirror.invalid
|
||||
https://cdn.jsdelivr.net/hex
|
||||
https://builds.hex.pm
|
||||
|
||||
test-invalid-mirror:
|
||||
name: Test errors with mirror
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use erlef/setup-beam
|
||||
id: failing-setup-beam
|
||||
uses: ./
|
||||
continue-on-error: true
|
||||
with:
|
||||
otp-version: '24.3.4.6'
|
||||
elixir-version: 'v1.13.4'
|
||||
install-rebar: true
|
||||
install-hex: true
|
||||
hexpm-mirrors: https://mirror.invalid
|
||||
- name: Report unexpected success
|
||||
if: ${{ steps.failing-setup-beam.outcome == 'success' }}
|
||||
run: |
|
||||
echo "Action is expected to fail"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user