* Update some dependencies' versions (also, get rid of husky)
* Introduce branch dependency execution
We want the most important things to fail first and prevent the
other ones from executing
e.g. if your dist/ is not updated, there's no point seeing the tests fail
* Rid ourselves of bloat
* Introduce expectations for upcoming version
* Tweak whitespace
* Tweak our calls to getVersionFromSpec (increase code consistency)
* Remove non-used variable
* Start coercing on input, stop sorting/maybe prepending 'v' on input
We'll deal with all this in a centralized place to make
it easier to reason on the code
* Revamp our getVersionFromSpec
1. stop accepting maybePrependWithV0, since this is only used in specialized
cases
2. sort versions internally (don't expect it to come sorted)
3. compare rc/strict and .includes in a single go (don't separate these)
4. don't expect already coerced version arrays, coerce them when required
(the maybeCoerced version had changed already, which means we're smarter
at putting stuff inside the version array)
5. raise an exception if a semver-invalid version is not flagged as strict
* Reduce our expectations, but still be appropriate to our mission
* Update our tests for our new expectations (start the TDD bit)
* Execute npm run build-dist and keep results
* Increase inter-job dependency
* Don't expect markdownlint to be installed remotely
* Revert "Increase inter-job dependency"
This reverts commit 500b0fe7e9eec1c4f258b4d16b40719ee1d0a1ad.
* Revert "Introduce branch dependency execution"
This reverts commit fbe1317a800d7722f4e8b668c073218263d0ab17.
* Have all the CI workflows run under the same conditions
* Fix as per CI results
* Re-establish the possibility to match versions like 22.3.4.2.1.0
We cheat on the semver matching:
1. we keep an ordered list of versions that respect e.g. 22.3.4
2. if we match 22.3.4 when fetching a version, we get the last value
from the list of versions that respect it, e.g. 22.3.4.2.1.0
(since this is ordered, it should work as previously expected)
This increases code complexity for getVersionFromSpec,
but hopefully not by much...
We also remove throw-based test cases (non-versions will fail later,
with null), and add some tests to prove our need code.
* Trim out linting practices
But still keep them useful
* Add more stuff to test on
* Tweak our debugging (more verbose when the runner is in debug mode)
* Hopefully make it easier to debug
* Have the distribution work :-)
* Adapt to a better reality
* Act on CI results: fix as per what GitHub Actions is requesting
Seems to have worked up until recently, but then it started
breaking :shrug
* Name the workflow a little better
* Enable debug for OTP versions' listings
* Make it easier to detect
* Prevent error annotation on expected error
The fact that one mirror fails in the above test and others follow
working is test enough for me
A single failing mirror should fail, but it's confusing to have
an error annotation for a success (via continue-on-error) while
not being able to suppress it via GitHub Actions
* Trying to figure out why we have a rebar_core exception
Might simply be that the bug is already fixed and we need to bump rebar3
* Try to debug into non-JSON input
* Prevent error in rebar_core
We're getting Access Denied for
Fetching registry from "https://repo.hex.pm:443/registry.ets.gz?"
* Try to figure out what's breaking tests
* Make jsonParse(...).map failure more understandable
* Ease test maintenance
* Tweak folder structure while moving console._ to core._
* 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>
* Provide an input for github tokens
- By providing an input for github tokens with a default users no longer have to pass
the github token via their environment across workflows.
- Remove GITHUB_TOKEN from our environment in all workflows
* Don't run workflows on main on pull requests
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
* Repeat request on error (while logging it)
* Test one change at a time
* Conditionally authorize requests
This seems to affect Windows builds, so might not be the best solution,
but we're trying to isolate the issue to move forward
* Act on CI results
* Ease consumption via a JSON.parse wrapper
We still throw the error, but in a more controlled manner
* Act on CI results
* Check behaviour on Windows pre- Gleam 0.23
* Increase consistency with .sh counterpart
* Support older versions (pre 0.22.1) on Windows
* Increase inter-script consistency
* Run `npm run build-dist`
* React to CI results
* Make README links usable
* Update versions under test
Otherwise it silently fails with "Error: Requested Erlang/OTP version
(23.2) not found in version list (should you be using option
'version-type': 'strict'?)", which is not too important since this
happens when setup-beam.js is included (which happens in the test
environment only)
* Fix failing Gleam test
I think `gleam check` requires OTP (execution complains about missing
`escript`) where `gleam format` does not
* Provide a working rebar.cmd for system that need it
(Windows on non-PowerShell)
* Add tests for recent changes
If the "run" were to fail the job would too
* Check if Rust can find it
* feat: add escripts to path
* Update src/install-elixir.ps1
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
* add github action combo to test escript
* force install
* use os homedir for escript install path
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
* Ease consumption by means of .tool-versions
* Update as per self-review
* Update as per self-review
* Act on CI results
* Act on CI results
* Act on CI results
This value is check by code, in any case
* Act on CI results
* Act on CI results
* Act on CI results
It appears we can't install Elixir twice on Windows, but can
on Ubuntu; this is outside the scope of this branch's context
so I won't fix it now
* Tweak visual consumption elements
* Ease potential future maintenance and/or update
* Update all our deps
Get rid of warnings such as:
* `save-state` will be deprecated
* `set-output` will be deprecated
* nodejs 12 is being deprecated
...
Rely on tests to make sure the actions still works
* Fix as per CI results
* Get rid of deprecated containers
* Have a warningless run
We're not testing rebar3 here, in any case
* Check tests failing for something that should pass
* Test with version-type: strict
* Add more tests
GitHub actions is refusing to run a given workflow :shrug
* Try to fix new test that shouldn't be failing
Which is exactly what we intended to originate by starting a new
pull request.
* Fix tests as per CI
* Fix tests as per CI
* Adapt to "latest"
* Fix as per CI results
Actions' window shows everything as Ok but then internals not
Error when evaluating 'runs-on' for job 'integration_test'. .github/workflows/ubuntu.yml (Line: 19, Col: 14): Unexpected type of value '', expected type: OneOf.
Strange one, this one!
* Try to "help" for non-OTP declared input
We do this for OTP-, but not for maint-
as the former is hopefully more common
than the latter
* Introduce `latest` to signify `master`
Semantically they're similar, but with `latest` we know:
1. to fetch Elixir's no-otp-... version
2. to fetch Erlang's master
whereas with 25 (latest at this moment) we'd
try to fetch elixirvsn-otp-25 which could fail with
Elixir master and version-type strict
* Fix as per CI
Still not 100% convinced that `latest` should be separate from `master`
but I want to know how tests run, in this case in particular
* Fix as per CI
* Fix as per CI
* Revert potential wrong decision
* Fix as per understand recent Elixir changes (namely master v. main)
* Try to simplify it
We introduce the concept of version v. branch (as per @ericmj)
and we use that to find the most appropriate Erlang/Elixir combo.
* Prevent "future" errors when choosing incompatible Elixir v. OTP versions
* Fix tests as per GitHub Actions' output
* Make test elixir `master` strict
It has no -otp- in the name
* Update for latest Gleam
- Gleam releases now use LLVM triplets for platforms so the download
URLs have been updated accordingly.
- Gleam's rebar3 support has been removed.
This change means that future versions of this action cannot download
older versions of Gleam. I can make it backwards compatible, but I will
need help from someone who can convert the shell script into PowerShell
for Windows.
* Support older Gleam versions
* Remove rebar from Gleam
* Add Erlang/OTP 25+ (not RC) to tests
* Test a specific combo
And a strict version
* Allow testing "edge" cases
We weren't taking our own considerations into account for version strictness
We want to be able to test cases where we use -otp- (if the consumer is doing
it, at least they have to use _strict_ to assert their decision)
* Fix CI as per failure in main (action.yml)
* Apply Dependabot alert from GitHub security alert digest
* Keep up with Node.js
* Run action.yml on Node 14 (locally)
* Support more OTP+Windows versions (try to bridge the gap with gleam-lang/setup-erlang that seems to support pre-21 versions)
* Merge ci.yml and test.yml
* Add Elixir to the Windows mix
* Hopefully improve error/warning messages
* Adapt the doc.s to the current reality
* Add option version-type (loose by default, for compatibility)
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