mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-23 07:06:07 +00:00
89cb00455a
Previously (Remove redundant code) (+27 squashed commits) Squashed commits: [0b79c31] Rename as setup-beam [312b42b] Simplify platform verification [b43ca96] Prevent use of OTP- prefixed Erlang/OTP versions [103a236] Move the promise-based approach to an async-based approach (not testing for failure, so not guaranteeing readable/usable output either) [1e7f631] Remove local test files [d03e0c6] Prevent use of -otp- infixed Elixir versions [697110e] Have versions output in action, not just in tests [7360781] Ease test validations [71e6999] Reinstall tests that were there before [6602f20] Attempt at simplifying regexp matching with build listings [09247af] Provide for an Elixir to "not OTP" fallback mechanism (as explained by the comments) [dfc4083] Attempt at renaming for clarity We also get rid of return values when not reachable We also move the `-otp-` part of the Elixir version upstream so it's easy to reason about (and update the tests accordingly) [0d4eb28] Bump our dep.s (trying to figure out why core.setFailed isn't making the action fail, as it should) [ebf48ef] Have action fail (with an exception) when no expected version is found (we otherwise feel that a simple warning is not enough, as it may end up hiding potential bugs) [8478364] Adapt tests to our actual inputs [16ea63d] Add prettier again, now sync'ed with jslint (pass it on the code, already) [cfc65df] Improve error messages and tests [a017948] Test unavailable Elixir upon mix [7f2a3e9] Test failing installations Also output core.error when expected [08061ca] Attempt at making shell scripts more robust [4ee73cb] Separate test code from production code 1. inputs (for CI) are managed by code, not by .yml env. variables 2. rebar3_builds.txt added for stable repeatability 3. tests tweaked to make it easier to modify and drop dependency on production code 4. `dist` regenerated (duplicate files gone) 5. setup-elixir.js tweaked to this new reality [d17fed4] Remove prettier from the package [7d6f8f5] Actually break CI when we should [b972eaf] Remove unrequired element [0ffa28a] Ease maintenance and readability [4690169] Fix as per broken tests [a1371c6] Merge setup-erlang in
120 lines
3.7 KiB
YAML
120 lines
3.7 KiB
YAML
---
|
|
name: test
|
|
|
|
on:
|
|
push: {branches: main}
|
|
pull_request: {branches: main}
|
|
repository_dispatch:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
unit_test:
|
|
name: Pre-release unit tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v1
|
|
with: {node-version: '12'}
|
|
- run: npm ci
|
|
- run: npm test
|
|
|
|
integration_test:
|
|
name: >
|
|
Pre-release integration tests
|
|
(Erlang/OTP ${{matrix.pair.otp-version}},
|
|
Elixir ${{matrix.pair.elixir-version}},
|
|
rebar3 ${{matrix.pair.rebar3-version}})
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pair:
|
|
# Full Versions
|
|
- otp-version: '22.0'
|
|
elixir-version: '1.9.1'
|
|
- otp-version: '22.3.4'
|
|
rebar3-version: '3.14.4'
|
|
# Semver ranges
|
|
- otp-version: '21.x'
|
|
elixir-version: '<1.9.1'
|
|
- otp-version: '21.x'
|
|
rebar3-version: '3.14.4'
|
|
# Branches
|
|
- otp-version: '22.0'
|
|
elixir-version: master
|
|
- otp-version: 'master'
|
|
elixir-version: '1.11.3'
|
|
# Pre-releases
|
|
- otp-version: '23.0'
|
|
elixir-version: '1.11.0-rc.0'
|
|
# Fallback to Elixir (with no OTP)
|
|
- otp-version: '24.0-rc1'
|
|
elixir-version: '1.9.3'
|
|
# Miscellaneous combos
|
|
- elixir-version: 'master'
|
|
otp-version: '22.3'
|
|
- elixir-version: 'master'
|
|
otp-version: '22'
|
|
- elixir-version: 'master'
|
|
otp-version: '^22'
|
|
- elixir-version: 'master'
|
|
otp-version: '22'
|
|
- elixir-version: '1.6.5'
|
|
otp-version: 'maint-21'
|
|
- elixir-version: 'v1.6.5'
|
|
otp-version: 'maint-21'
|
|
- elixir-version: 'v1.9.x'
|
|
otp-version: '21.1'
|
|
- elixir-version: '1.9.x'
|
|
otp-version: '21'
|
|
- elixir-version: 'v1.8.x'
|
|
otp-version: '22'
|
|
- elixir-version: 'v1.8.x'
|
|
otp-version: '23.1'
|
|
- elixir-version: 'v1.8'
|
|
otp-version: '^22.3'
|
|
- elixir-version: 'v1.10'
|
|
otp-version: '21.x'
|
|
- elixir-version: 'v1.x'
|
|
otp-version: 'master'
|
|
- elixir-version: 'v1.11.0-rc.0'
|
|
otp-version: '23'
|
|
- elixir-version: 'v1.11.0-rc.0'
|
|
otp-version: '23.0'
|
|
- elixir-version: 'v1.11.0-rc.0'
|
|
otp-version: 'master'
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Use erlef/setup-beam
|
|
id: setup-beam
|
|
uses: ./
|
|
with:
|
|
otp-version: ${{matrix.pair.otp-version}}
|
|
elixir-version: ${{matrix.pair.elixir-version}}
|
|
rebar3-version: ${{matrix.pair.rebar3-version}}
|
|
- name: Erlang/OTP version (action)
|
|
run: echo "Erlang/OTP ${{steps.setup-beam.outputs.otp-version}}"
|
|
- name: Elixir version (action)
|
|
run: echo "Elixir ${{steps.setup-beam.outputs.elixir-version}}"
|
|
if: ${{matrix.pair.elixir-version}}
|
|
- name: rebar3 version (action)
|
|
run: echo "rebar3 ${{steps.setup-beam.outputs.rebar3-version}}"
|
|
if: ${{matrix.pair.rebar3-version}}
|
|
- name: mix version and help (CLI)
|
|
run: |
|
|
mix -v
|
|
mix help local.rebar
|
|
mix help local.hex
|
|
if: ${{matrix.pair.elixir-version}}
|
|
- name: Run Mix project tests
|
|
run: |
|
|
cd test-projects/mix
|
|
mix deps.get
|
|
mix test
|
|
if: ${{matrix.pair.elixir-version}}
|
|
- name: Run rebar3 project tests
|
|
run: |
|
|
cd test-projects/rebar3
|
|
rebar3 as test do xref,dialyzer,ct,cover
|
|
if: ${{matrix.pair.rebar3-version}}
|