Commit Graph
48 Commits
Author SHA1 Message Date
Paulo F. OliveiraandGitHub 2595a954a1 Fix tests (#184)
* Fix licenses

* Be less hopeful

* Prevent remote breakage from breaking our CI
2023-03-29 22:54:51 -05:00
Paulo F. OliveiraandGitHub 049962787b Test rebar3 being installed after OTP via .tool-versions (#180) 2023-01-27 21:57:09 -06:00
Paulo F. OliveiraandGitHub 1f06ac36d3 Simulate input github-token to fix unit tests (#174)
* Simulate input to fix unit tests
2023-01-07 13:51:47 -06:00
Paulo F. OliveiraandGitHub 37ac1c5116 Try to prevent 403 when accessing the GitHub API (#168)
* 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
2023-01-04 07:27:57 +00:00
Paulo F. OliveiraandGitHub 2d314bc413 Check behaviour on Windows pre- Gleam 0.23 (#166)
* 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
2022-12-14 09:25:50 -06:00
Paulo F. OliveiraandGitHub aee3f52e58 Update versions as to not have CI fail (while fixing "non-failing" CI) (#164)
* 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
2022-12-11 18:33:12 -06:00
Paulo F. OliveiraandGitHub 35850967ef Have rebar3.cmd work on a Windows CMD shell (#151)
* 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
2022-12-01 19:16:40 +00:00
Paulo F. OliveiraandGitHub c373088147 Ease consumption by means of .tool-versions (#159)
* 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
2022-11-22 22:34:21 +00:00
Paulo F. OliveiraandGitHub 713cc2ffe3 Move away from set-output (while updating all deps) (#148)
* 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
2022-10-19 21:51:01 +01:00
Paulo F. OliveiraandGitHub 8d31e4db55 Allow version-type: strict + otp-version: master for Elixir -based builds (#144)
* 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.
2022-10-19 21:10:26 +01:00
Paulo F. OliveiraandGitHub 6b2f8153b4 Crash on invalid Elixir+OTP combo (#134)
* 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
2022-09-13 08:21:46 +01:00
Paulo F. OliveiraandGitHub 69fb25ba7e Ease consumption (#125)
Don't take `maint-` -prefixed versions into account unless they're asked for it
specifically
At the same time, while fetching versions, make sure we identify them better so that
25 does not end up pulling maint-25 instead of OTP-25.0, as it should
2022-08-01 13:23:47 +01:00
Paulo F. OliveiraandGitHub caa49b0658 Try current state with Ubuntu 22.04 (#124) 2022-07-12 21:59:53 -05:00
Paulo F. OliveiraandGitHub ac7b7d515b Test on top of Erlang/OTP 25+ (not RC) (#118)
* 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)
2022-05-30 15:11:49 +01:00
Paulo F. OliveiraandGitHub 311afd9034 Apply security fix as proposed by Dependabot (#110)
* Apply security fix as proposed by Dependabot

I actually went to the developer first, pull request the lib., but then my
update got reject, since the lib. moved to TypeScript (from JavaScript);
still, a new release was done and this might just solve our issue

* Update eslint as warned by GitHub notifications
2022-04-23 20:01:06 +01:00
Paulo F. OliveiraandGitHub 9d4fdad6a1 Feature/run build dist (#109)
* Remove duplicates

We already have everything we need in 3RD_PARTY_LICENSES

* Be mindful of pull request creators
2022-04-21 23:51:29 +01:00
Paulo F. OliveiraandGitHub 5436ca9587 Keep up with the times (#102)
* Keep up with the times

* Act on local static analysis (and other actions) results

npm run ... from package.json
2022-04-12 18:20:59 +01:00
Paulo F. OliveiraandGitHub 2e0500f2a5 Handle strings as such (#100)
* Handle strings as such

* Let automation do its thing
2022-04-07 20:27:52 +01:00
Paulo F. OliveiraandGitHub c428d8c359 Attempt use on top of Erlang 25.0-rc1 (#93) 2022-02-22 11:09:02 +00:00
Paulo F. OliveiraandGitHub 2494d08aa0 Add environment variables (#94)
* Allow for Windows'22 container

(win22 is just a guess, at this moment)

* Add environment variables

* Clean up code
2022-02-22 11:05:11 +00:00
Paulo F. OliveiraandGitHub b28629c519 Allow for Windows'22 container (#91)
(win22 is just a guess, at this moment)
2022-02-22 11:04:38 +00:00
Paulo F. OliveiraandGitHub df03a946e0 Fix 3rd party license updater (#92)
Instead of pushing directly (since the main branch is protected) this creates a pull request
2022-02-22 10:54:04 +00:00
Paulo F. OliveiraandGitHub 6c5caca0fb Update our dependencies to increase security (#88) 2022-01-13 20:49:02 +00:00
Paulo F. OliveiraandGitHub 730ac65cba Fix failing CI (#87) 2022-01-12 18:22:12 +00:00
Paulo F. OliveiraandGitHub 65219deb69 Prevent deprecation warnings (#83) 2022-01-12 14:25:57 +00:00
Paulo F. OliveiraandGitHub c71c5c91bb Allow using rebar3 nightly builds (#84) 2022-01-12 14:25:40 +00:00
Paulo F. OliveiraandGitHub e6ab31075d Allow disabling problem matchers (#85) 2022-01-12 11:41:23 +00:00
Paulo F. OliveiraandGitHub 3250a83e5a Automate updating 3rd party licenses (#82) 2022-01-12 11:40:11 +00:00
Paulo F. OliveiraandGitHub c255c7e97f Fix CI as per failure in main (action.yml) (#71)
* 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)
2021-09-07 04:15:25 +01:00
Paulo F. OliveiraandGitHub c988d89031 Add Gleam (#67) 2021-08-03 18:56:12 +01:00
Paulo F. OliveiraandGitHub 14d4bc3919 Ease debugging around ImageOS env.var (#63) 2021-07-26 17:30:18 +01:00
Paulo F. OliveiraandGitHub 9283f857f1 Improve warning message for missing ImageOS env. variable (self-hosted runners) (#59) 2021-07-12 18:35:08 +01:00
Paulo F. OliveiraandGitHub 830642517c Improve visibility (+ fix bugs) over version-type and opt-in versions (#57)
(and tweak README regarding action versioning)
2021-07-09 10:11:50 +01:00
Paulo F. OliveiraandGitHub d8a37f5aac Improve on "Add Windows to the mix" (#52)
* 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)
2021-07-08 15:35:25 +01:00
Paulo F. OliveiraandGitHub 82b4475ba2 Add Windows to the mix (#49) 2021-06-24 21:58:51 +01:00
Paulo F. OliveiraandGitHub dd4eb24e91 Adapt test var. naming to current reality (#47) 2021-06-09 16:21:33 +01:00
Paulo F. OliveiraandGitHub e6db7bde79 Add Erlang 24 to README and some more info on version matching (#45) 2021-06-09 15:59:44 +01:00
Paulo F. OliveiraandGitHub 31cf3db78c Ease maintenance (#43) 2021-05-28 14:49:33 +01:00
Paulo F. OliveiraandGitHub 11d59b146c Allow for latest 100 rebar3 versions when fetching from GitHub (#42) 2021-05-27 20:28:05 -05:00
Paulo F. OliveiraandGitHub b50aa18219 v1.7.1 (#35) 2021-05-15 00:29:16 +01:00
Paulo F. OliveiraandGitHub a550a4c889 Coerce non-semver into semver (#34) 2021-05-15 00:07:41 +01:00
Paulo F. OliveiraandGitHub d2707f347b Tweak our test combos (#31) 2021-04-19 23:17:55 +01:00
Paulo F. OliveiraandGitHub 78d10b5f61 v1.7.0 (#30) 2021-04-03 00:31:42 +01:00
Paulo F. OliveiraandGitHub f05ed1cf77 Add Erlang/OTP v. Ubuntu compatibility list (#27) 2021-03-31 22:00:01 +01:00
Paulo F. OliveiraandGitHub 1f3954e2a3 Reduce size of dist (#26) 2021-03-31 19:18:27 +01:00
Paulo F. OliveiraandGitHub 46b1995d92 Aim for warningless (and more complete) test coverage on rebar3 and mix (#25) 2021-03-31 18:52:14 +01:00
Paulo F. OliveiraandGitHub 0b481810f8 Apply stricter linting (#24) 2021-03-30 21:58:09 +01:00
Paulo F. OliveiraandGitHub 89cb00455a Introduce rebar-version (#9)
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
2021-03-30 11:54:20 -05:00