* Do a bit of YAMLlint'ing
* Ease consumer cache invalidation
By providing an output with the action version we ease
cache invalidation on consumer, due to the fact we can
now stop worrying about changes to the action's cache itself
Might also be interesting for self-hosted runners...
* Remove duplicates
* Do further validations for robustness
* Make iterating over mirrors more flexible (and reusable)
At the same time we fix an error, where we aren't using the
mirrors for the OTP build :)
* Make installation of cache-based tool callback -based
This hopefully eases introduction of new languages at the cost
of a bit of abstraction (there's an extensive comment on how to
fill in the install options' object)
We'll soon test this abstraction by making Gleam and rebar3
cached too
* Increase our visibility when debugging
* Improve on lessons learned to ease incorporation of further caches
(starting with Gleam on Linux)
* Cache Gleam on Windows
* Cache Rebar3 on Linux
Also, gets rid of all .sh
* Cache Rebar3 on Windows
Also, gets rid of all .ps1
* Act on CI results
And also be consistent when it comes to using
fs....Sync vs fs.promise....
* Move tests to a single file
* Move main executable to a single file
* Decrease number of changes to ease review
* Expose function required for tests
* Don't async/await when not required
* Resolve post- merge-conflict resolution issues
* 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
* Fix OTP version null check
* Revert "Fix OTP version null check"
This reverts commit 2c433c16ac.
* Check that the resolved versions contain the spec.
* Only perform semver version resolution when spec is not an rc and version-type is not strict
* Move version inclusion check to the end of the function, when we may have prepended a 'v'
* Refactor function return
* Add test case for strict version resolving a spec that is no available version
* Link to the elixir/erlang compatibility page
Currently when a user encounters an incompatibility between the
requested elixir and erlang versions it isn't clear how to figure out
what the compatible versions are. This is the current error as shown to users:
> Error: Requested Elixir / Erlang/OTP version (1.11.3 / 24.2) not found in version list (did you check Compatibility between Elixir and Erlang/OTP?)
Example failure: https://github.com/ScenicFramework/scenic/pull/318/checks
This PR adds a link to
https://hexdocs.pm/elixir/compatibility-and-deprecations.html so user's
can easily see what versions are compatible.
* Update dist/index.js
* Act on review comment: on > at
---------
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
* 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>
In my Windows 11 test environment, using Powershell Core 7.3.4, I get
the following message while running similar code to what this github
action uses:
```
Installed Elixir version follows
InvalidOperation: C:\Users\vagrant\setup-beam\src\test.ps1:4
Line |
4 | & "${DIR_FOR_BIN}/bin/elixir" "-v" | Write-Output
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot run a document in the middle of a pipeline: C:\elixir\bin\elixir.
```
Adding `.bat` fixes the issue. This is probably not the root cause of
erlef/setup-beam#189, however.