Compare commits

...

124 Commits

Author SHA1 Message Date
Jonatan Männchen 91bce83a29 Add win11-arm64 to ImageOS mapping 2026-05-05 08:14:33 +02:00
GitHub Actions e5f1a7b722 Automation: update setup-beam version output to 7a27046 2026-04-29 01:33:13 +00:00
github-actions[bot] 7a27046239 Update 3rd party licenses (automation) (#446)
Update 3rd party licenses

Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-04-29 02:32:56 +01:00
GitHub Actions fc68ffb904 Automation: update setup-beam version output to 190c3a5 2026-03-30 09:54:16 +00:00
Mitchell Henke 190c3a5e7b Fix error that occurs when parsing TOML files that use dotted keys (#444)
* Add test for parsing TOML file with dotted keys

* Use smol-toml instead of toml for TOML parsing

* Run build-dist
2026-03-30 10:53:57 +01:00
GitHub Actions 92dab893ed Automation: update setup-beam version output to 5dfda65 2026-03-28 23:59:28 +00:00
Paulo F. Oliveira 5dfda65506 fix: address Prototype Pollution via parse() in NodeJS flatted (#445)
Address Prototype Pollution via parse() in NodeJS flatted
2026-03-28 23:59:07 +00:00
GitHub Actions ef385d6edc Automation: update setup-beam version output to bf3c3af 2026-03-27 12:34:17 +00:00
dependabot[bot] bf3c3af135 Bump picomatch from 4.0.3 to 4.0.4 in the npm_and_yarn group across 1 directory (#443)
Bump picomatch in the npm_and_yarn group across 1 directory

Bumps the npm_and_yarn group with 1 update in the / directory: [picomatch](https://github.com/micromatch/picomatch).


Updates `picomatch` from 4.0.3 to 4.0.4
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/4.0.3...4.0.4)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 12:33:58 +00:00
GitHub Actions e7645e4102 Automation: update setup-beam version output to a36098e 2026-03-27 12:28:06 +00:00
dependabot[bot] a36098e741 Bump csv-parse from 6.1.0 to 6.2.1 (#440)
* Bump csv-parse from 6.1.0 to 6.2.1

Bumps [csv-parse](https://github.com/adaltas/node-csv/tree/HEAD/packages/csv-parse) from 6.1.0 to 6.2.1.
- [Changelog](https://github.com/adaltas/node-csv/blob/master/packages/csv-parse/CHANGELOG.md)
- [Commits](https://github.com/adaltas/node-csv/commits/csv-parse@6.2.1/packages/csv-parse)

---
updated-dependencies:
- dependency-name: csv-parse
  dependency-version: 6.2.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Help Dependabot out: npm run build-dist

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-27 12:27:46 +00:00
GitHub Actions 87781dc68a Automation: update setup-beam version output to d5f3979 2026-03-27 12:20:31 +00:00
Levi Buzolic d5f3979a5f Support Node 24 runtime (#426)
Update the action runtime, engine constraint, and CI workflow pins from Node 20 to Node 24 per GitHub's guidance on the deprecation of Node 20 on GitHub Actions runners: https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
2026-03-27 12:20:13 +00:00
GitHub Actions 930b3281ba Automation: update setup-beam version output to 30056ca 2026-03-27 12:18:44 +00:00
github-actions[bot] 30056ca086 Update 3rd party licenses (automation) (#442)
Update 3rd party licenses

Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-03-27 12:18:24 +00:00
GitHub Actions 1f3f354e6a Automation: update setup-beam version output to 3e49772 2026-03-27 12:11:39 +00:00
github-actions[bot] 3e49772722 Update 3rd party licenses (automation) (#436)
Update 3rd party licenses

Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-03-27 12:11:17 +00:00
dependabot[bot] 2ac22cd739 Bump yauzl from 3.2.0 to 3.2.1 in the npm_and_yarn group across 1 directory (#437)
Bump yauzl in the npm_and_yarn group across 1 directory

Bumps the npm_and_yarn group with 1 update in the / directory: [yauzl](https://github.com/thejoshwolfe/yauzl).


Updates `yauzl` from 3.2.0 to 3.2.1
- [Commits](https://github.com/thejoshwolfe/yauzl/compare/3.2.0...3.2.1)

---
updated-dependencies:
- dependency-name: yauzl
  dependency-version: 3.2.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 12:11:05 +00:00
GitHub Actions c4782c7b58 Automation: update setup-beam version output to 0afadf6 2026-03-27 12:10:54 +00:00
dependabot[bot] 0afadf6bdd Bump eslint from 10.0.3 to 10.1.0 (#439)
Bumps [eslint](https://github.com/eslint/eslint) from 10.0.3 to 10.1.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.0.3...v10.1.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-27 12:10:34 +00:00
GitHub Actions e539b1ee26 Automation: update setup-beam version output to c5f0656 2026-03-15 18:22:01 +00:00
github-actions[bot] c5f0656346 Update 3rd party licenses (automation) (#435)
Update 3rd party licenses

Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-03-15 18:21:42 +00:00
GitHub Actions ee09b1e59b Automation: update setup-beam version output to f8b54b5 2026-03-14 20:10:39 +00:00
Paulo F. Oliveira f8b54b559e Run ARM-specific tests consistently (#434)
* Run ARM-specific test consistently

* Fix for builds.hex.pm

https://builds.hex.pm/builds/otp/arm64/ubuntu-<x>.04/builds.txt

file is only available when <x> >= 20.

* Fix for builds.hex.pm

https://builds.hex.pm/builds/otp/arm64/ubuntu-20.04/builds.txt

does not contain Erlang 19 any more...
2026-03-14 20:10:19 +00:00
GitHub Actions bf1ce74034 Automation: update setup-beam version output to 559a930 2026-03-14 16:57:33 +00:00
dependabot[bot] 559a930751 Bump undici from 6.23.0 to 6.24.0 in the npm_and_yarn group across 1 directory (#432)
* Bump undici in the npm_and_yarn group across 1 directory

Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici).


Updates `undici` from 6.23.0 to 6.24.0
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.23.0...v6.24.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.24.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* Help Dependabot (exec: npm run build-dist)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-14 16:57:11 +00:00
GitHub Actions 1380ebe712 Automation: update setup-beam version output to 0a54959 2026-03-14 16:50:39 +00:00
Sebastian Weddmark Olsson 0a549596b0 Compatibility matrix strategy (#389)
* Compatibility matrix strategy

Example on how one can maintain a compatibility matrix

* v2 -> v4

Co-authored-by: Kian-Meng Ang <kianmeng.ang@gmail.com>

* ubuntu-18 not longer available

* Update README.md after review suggestions

* Link rebar3 compat

Apparently rebar3 has started to maintain a version compatability table themselves. Missing older versions though

| 3.10.0 | 17         |
| 3.11.1 | 18         |

* Tweak README change proposal

* Apply suggestions from code review

Apply changes to resolve linter warnings

Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>

---------

Co-authored-by: Kian-Meng Ang <kianmeng.ang@gmail.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-14 16:50:22 +00:00
GitHub Actions 3a3c94fd9e Automation: update setup-beam version output to cfafb69 2026-03-14 16:43:34 +00:00
Daniel Widgren cfafb69ddd feat: add Erlang problem matchers (#433)
* feat: add Erlang problem matchers for erlc, dialyzer, CT, and EUnit

Adds GitHub Actions problem matchers for Erlang tooling, matching the
existing Elixir matcher support. Covers erlc errors/warnings (which
also catches dialyzer output), Common Test failures, and EUnit failures.

Closes #390

* chore: rebuild dist bundle and format test file

* refactor: move Erlang matchers into installOTP function

Moves maybeEnableErlangProblemMatchers() call inside installOTP(),
between setOutput and endGroup, matching the Elixir pattern.

* refactor: extract generic maybeEnableProblemMatchers function

Replaces separate maybeEnableErlangProblemMatchers and
maybeEnableElixirProblemMatchers with a single generic
maybeEnableProblemMatchers(language) and a problemMatchersEnabled()
helper.

* fix: use static paths for ncc to resolve matcher JSON files

ncc cannot trace dynamic template literals, so the matcher JSON files
were not being copied to dist/. Use a static map of paths instead.
2026-03-14 16:43:14 +00:00
GitHub Actions b3cbb6afbf Automation: update setup-beam version output to 2abe6cd 2026-03-14 16:30:13 +00:00
peter madsen-mygdal 2abe6cda7a fix: download correct Gleam binary for macOS and Linux ARM64 (#428)
The Gleam installer had two arch-related bugs:

1. Darwin reused the Linux config (installOpts.darwin = installOpts.linux),
   downloading x86_64-unknown-linux-musl on macOS, causing ENOEXEC.

2. Linux hardcoded x86_64, downloading the wrong binary on ARM64 runners,
   causing 'Syntax error' when trying to execute an x86_64 ELF.

Add arch detection via getRunnerOSArchitecture() to both Linux and
Darwin download URLs, selecting the correct aarch64 or x86_64 binary.
Add a proper Darwin config that downloads apple-darwin archives.
2026-03-14 16:29:49 +00:00
GitHub Actions d55fdba43f Automation: update setup-beam version output to eb86ad6 2026-03-14 16:29:25 +00:00
peter madsen-mygdal eb86ad6523 feat: add macOS-26 to supported ImageOS mappings (#430)
Add macos26 to the ImageOSToContainer map so runners using
macOS-26 are recognized instead of throwing an error.

Update macos.yml

Update README.md
2026-03-14 16:28:58 +00:00
GitHub Actions af6da5da48 Automation: update setup-beam version output to f018c1e 2026-03-13 23:46:13 +00:00
peter madsen-mygdal f018c1e6d8 fix: use dynamic import in tests to prevent ESM hoisting race (#429)
Static ESM imports are hoisted above top-level statements, causing
setup-beam.js to evaluate its main() guard before process.env.NODE_ENV
is set to 'test'. This triggered core.setFailed() during module load,
setting process.exitCode=1 and failing the test file even though all
individual test cases passed.

Switch setup-beam.js to a dynamic await import() so that the env and
input setup runs first, ensuring the NODE_ENV='test' guard works
correctly.

Amp-Thread-ID: https://ampcode.com/threads/T-019ce36a-a18f-7494-ac0a-c094a84f06ad

Co-authored-by: Amp <amp@ampcode.com>
2026-03-13 23:45:53 +00:00
GitHub Actions d843ebb78b Automation: update setup-beam version output to c8e0954 2026-03-11 17:47:37 +00:00
github-actions[bot] c8e09547a7 Update 3rd party licenses (automation) (#425)
Update 3rd party licenses

Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-03-11 17:47:17 +00:00
GitHub Actions 9d5b75ddfd Automation: update setup-beam version output to 98c13a9 2026-03-09 22:41:35 +00:00
Dino Kovač 98c13a9ed3 Support mise.toml (#415)
* add support for mise.toml version file type

* changes from review

* Keep versioning consistent

* fix default value for version-file-type input

* Use single `version-file`, autodetect type

* Update src/setup-beam.js

Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>

* Improve log output for mise version files

* Rebuild dist

* Run build-dist

* add support for mise.toml version file type

* changes from review

* Keep versioning consistent

* fix default value for version-file-type input

* Use single `version-file`, autodetect type

* Update src/setup-beam.js

Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>

* Improve log output for mise version files

* Rebuild dist

* Run build-dist

---------

Co-authored-by: Michael Ruoss <michael.ruoss@cradle.bio>
Co-authored-by: Michael Ruoss <michael@michaelruoss.ch>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-09 22:41:15 +00:00
GitHub Actions 0f13bcf18a Automation: update setup-beam version output to c3137f5 2026-03-09 22:19:29 +00:00
dependabot[bot] c3137f5cd5 Bump globals from 17.3.0 to 17.4.0 (#421)
* Bump globals from 17.3.0 to 17.4.0

Bumps [globals](https://github.com/sindresorhus/globals) from 17.3.0 to 17.4.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.3.0...v17.4.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Prevent Cannot access 'isStrictVersion' before initialization

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-09 22:19:11 +00:00
GitHub Actions 4cbacdb2a9 Automation: update setup-beam version output to 687000a 2026-03-09 22:10:23 +00:00
dependabot[bot] 687000ab96 Bump @actions/core from 1.11.1 to 3.0.0 (#419)
* Bump @actions/core from 1.11.1 to 3.0.0

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.11.1 to 3.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* npm run build-dist

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-09 22:09:48 +00:00
dependabot[bot] 9ba6605098 Bump eslint-plugin-yml from 1.18.0 to 3.3.1 (#418)
* Bump eslint-plugin-yml from 1.18.0 to 3.3.1

Bumps [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) from 1.18.0 to 3.3.1.
- [Release notes](https://github.com/ota-meshi/eslint-plugin-yml/releases)
- [Changelog](https://github.com/ota-meshi/eslint-plugin-yml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ota-meshi/eslint-plugin-yml/compare/v1.18.0...v3.3.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-yml
  dependency-version: 3.3.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Help Dependabot

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-09 22:09:38 +00:00
GitHub Actions 722d91de6e Automation: update setup-beam version output to f79887d 2026-03-09 17:46:19 +00:00
dependabot[bot] f79887d1ba Bump eslint from 10.0.1 to 10.0.3 (#420)
Bumps [eslint](https://github.com/eslint/eslint) from 10.0.1 to 10.0.3.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.0.1...v10.0.3)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 10.0.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 17:44:31 +00:00
dependabot[bot] 30a0896082 Bump markdownlint-cli from 0.47.0 to 0.48.0 (#422)
Bumps [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) from 0.47.0 to 0.48.0.
- [Release notes](https://github.com/igorshubovych/markdownlint-cli/releases)
- [Commits](https://github.com/igorshubovych/markdownlint-cli/compare/v0.47.0...v0.48.0)

---
updated-dependencies:
- dependency-name: markdownlint-cli
  dependency-version: 0.48.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 17:44:08 +00:00
dependabot[bot] 41c0004487 Bump actions/setup-node from 6.2.0 to 6.3.0 (#423)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 17:43:59 +00:00
dependabot[bot] 9fc15d548d Bump raven-actions/actionlint from 2.1.1 to 2.1.2 (#424)
Bumps [raven-actions/actionlint](https://github.com/raven-actions/actionlint) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/raven-actions/actionlint/releases)
- [Commits](https://github.com/raven-actions/actionlint/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: raven-actions/actionlint
  dependency-version: 2.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-09 17:43:51 +00:00
GitHub Actions 19003af5f4 Automation: update setup-beam version output to 53a564f 2026-03-07 14:40:30 +00:00
github-actions[bot] 53a564f4bb Update 3rd party licenses (automation) (#417)
Update 3rd party licenses

Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-03-07 14:40:09 +00:00
GitHub Actions 6ee130ce6b Automation: update setup-beam version output to 11a1f27 2026-03-06 20:46:44 +00:00
github-actions[bot] 11a1f27b1e Update 3rd party licenses (automation) (#416)
Update 3rd party licenses

Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-03-06 20:46:21 +00:00
GitHub Actions 83bf0e8bac Automation: update setup-beam version output to 47d6c3c 2026-03-03 17:18:10 +00:00
github-actions[bot] 47d6c3c4af Update 3rd party licenses (automation) (#414)
Update 3rd party licenses

Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-03-03 11:17:49 -06:00
GitHub Actions 0d2a6cb44d Automation: update setup-beam version output to 0f6ba5d 2026-03-03 04:07:24 +00:00
dependabot[bot] 0f6ba5d884 Bump @actions/tool-cache from 2.0.2 to 4.0.0 (#407)
* Bump @actions/tool-cache from 2.0.2 to 4.0.0

Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 2.0.2 to 4.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/@actions/cache@4.0.0/packages/tool-cache)

---
updated-dependencies:
- dependency-name: "@actions/tool-cache"
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Help Dependabot

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-03 04:07:06 +00:00
GitHub Actions 58166ce788 Automation: update setup-beam version output to 4a07ed8 2026-03-03 03:58:51 +00:00
dependabot[bot] 4a07ed84ac Bump @actions/exec from 1.1.1 to 3.0.0 (#405)
* Bump @actions/exec from 1.1.1 to 3.0.0

Bumps [@actions/exec](https://github.com/actions/toolkit/tree/HEAD/packages/exec) from 1.1.1 to 3.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/exec/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/exec)

---
updated-dependencies:
- dependency-name: "@actions/exec"
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Modernize JS somewhat

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-03 03:58:30 +00:00
GitHub Actions de78da9a9d Automation: update setup-beam version output to 9928a16 2026-03-02 23:18:44 +00:00
github-actions[bot] 9928a16c11 Update 3rd party licenses (automation) (#413)
Update 3rd party licenses

Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-03-02 23:18:00 +00:00
GitHub Actions 3964390c66 Automation: update setup-beam version output to 1dacaf8 2026-03-02 23:14:32 +00:00
Paulo F. Oliveira 1dacaf8a01 Fix for license update automation (#412) 2026-03-02 23:14:13 +00:00
GitHub Actions fa8ba5f70e Automation: update setup-beam version output to daf8797 2026-03-02 22:09:05 +00:00
Paulo F. Oliveira daf8797d04 Update 3rd party licenses (#411)
Co-authored-by: GitHub Actions <actions@user.noreply.github.com>
2026-03-02 22:08:40 +00:00
GitHub Actions de72677f00 Automation: update setup-beam version output to 334f76c 2026-03-02 21:59:55 +00:00
dependabot[bot] 334f76ce04 Bump semver from 7.7.2 to 7.7.4 (#406)
* Bump semver from 7.7.2 to 7.7.4

Bumps [semver](https://github.com/npm/node-semver) from 7.7.2 to 7.7.4.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.7.2...v7.7.4)

---
updated-dependencies:
- dependency-name: semver
  dependency-version: 7.7.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Help Dependabot

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-02 21:59:33 +00:00
GitHub Actions 86b5ecbf21 Automation: update setup-beam version output to b8fc6e4 2026-03-02 21:34:07 +00:00
dependabot[bot] b8fc6e435e Bump @eslint/js from 9.38.0 to 10.0.1 (#404)
* Bump @eslint/js from 9.38.0 to 10.0.1

Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.38.0 to 10.0.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v10.0.1/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 10.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Help Dependabot

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-03-02 21:33:26 +00:00
GitHub Actions e7fda7af4e Automation: update setup-beam version output to a50e3e2 2026-03-02 21:22:09 +00:00
dependabot[bot] a50e3e2f89 Bump prettier from 3.6.2 to 3.8.1 (#408)
Bumps [prettier](https://github.com/prettier/prettier) from 3.6.2 to 3.8.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.6.2...3.8.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 21:21:18 +00:00
dependabot[bot] 7bc1e4ca67 Bump actions/setup-node from 6.1.0 to 6.2.0 (#409)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v6.1.0...v6.2.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 21:21:10 +00:00
dependabot[bot] baf2bc3313 Bump raven-actions/actionlint from 2.1.0 to 2.1.1 (#410)
Bumps [raven-actions/actionlint](https://github.com/raven-actions/actionlint) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/raven-actions/actionlint/releases)
- [Commits](https://github.com/raven-actions/actionlint/compare/v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: raven-actions/actionlint
  dependency-version: 2.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-02 21:21:02 +00:00
GitHub Actions 3580539cee Automation: update setup-beam version output to fe5485f 2026-02-28 14:47:15 +00:00
dependabot[bot] fe5485f1f6 Bump @eslint/js from 9.31.0 to 9.38.0 (#393)
* Bump @eslint/js from 9.31.0 to 9.38.0

Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.31.0 to 9.38.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/v9.38.0/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.38.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Help Dependabot out (?)

* Address vulnerabilities with markdownlint-cli

* Do the bump proposed by the PR

* Go back to a working, albeit apparently vulnerable, version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-02-28 14:46:57 +00:00
GitHub Actions 98de8ffa90 Automation: update setup-beam version output to 6c5fe27 2026-02-28 14:28:14 +00:00
dependabot[bot] 6c5fe278e7 Bump the npm_and_yarn group across 1 directory with 2 updates (#403)
* Bump the npm_and_yarn group across 1 directory with 2 updates

Bumps the npm_and_yarn group with 2 updates in the / directory: [lodash](https://github.com/lodash/lodash) and [glob](https://github.com/isaacs/node-glob).


Updates `lodash` from 4.17.21 to 4.17.23
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

Removes `glob`

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: glob
  dependency-version: 
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* Commit `npm run build-dist`'s results

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2026-02-28 14:27:55 +00:00
GitHub Actions 36214a49c0 Automation: update setup-beam version output to 972bec8 2026-02-28 14:19:09 +00:00
dependabot[bot] 972bec8037 Bump actions/checkout from 4.2.2 to 6.0.1 (#399)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.2.2...v6.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 14:18:53 +00:00
GitHub Actions 10e998534e Automation: update setup-beam version output to 542d9a8 2026-02-28 14:07:57 +00:00
Paulo F. Oliveira 542d9a8e62 Improve output (around "Requested ... version") when we know input (#368)
Improve output when we know input
2026-02-28 14:07:39 +00:00
GitHub Actions b764149ef2 Automation: update setup-beam version output to cba803d 2026-02-28 13:59:20 +00:00
dependabot[bot] cba803d7b7 Bump @vercel/ncc from 0.38.3 to 0.38.4 (#387)
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.38.3 to 0.38.4.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.38.3...0.38.4)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-version: 0.38.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 13:58:54 +00:00
dependabot[bot] eda66a8458 Bump globals from 16.3.0 to 16.4.0 (#383)
Bumps [globals](https://github.com/sindresorhus/globals) from 16.3.0 to 16.4.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.3.0...v16.4.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 16.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 13:58:43 +00:00
GitHub Actions cf0aea912f Automation: update setup-beam version output to 13b647e 2026-02-28 13:36:13 +00:00
dependabot[bot] 13b647ed24 Bump shellcheck from 3.1.0 to 4.1.0 (#376)
Bumps [shellcheck](https://github.com/gunar/shellcheck) from 3.1.0 to 4.1.0.
- [Release notes](https://github.com/gunar/shellcheck/releases)
- [Changelog](https://github.com/gunar/shellcheck/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gunar/shellcheck/compare/v3.1.0...v4.1.0)

---
updated-dependencies:
- dependency-name: shellcheck
  dependency-version: 4.1.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 13:35:39 +00:00
dependabot[bot] d6f6c371de Bump eslint from 9.31.0 to 9.38.0 (#394)
Bumps [eslint](https://github.com/eslint/eslint) from 9.31.0 to 9.38.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.31.0...v9.38.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.38.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 13:34:45 +00:00
dependabot[bot] 905cf79e7d Bump js-yaml from 4.1.0 to 4.1.1 in the npm_and_yarn group across 1 directory (#396)
Bump js-yaml in the npm_and_yarn group across 1 directory

Bumps the npm_and_yarn group with 1 update in the / directory: [js-yaml](https://github.com/nodeca/js-yaml).


Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 13:34:31 +00:00
GitHub Actions 4f85a51ca2 Automation: update setup-beam version output to fc1fdd6 2026-02-28 13:34:23 +00:00
dependabot[bot] fc1fdd6f00 Bump actions/setup-node from 4.4.0 to 6.1.0 (#400)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.4.0 to 6.1.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4.4.0...v6.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 13:34:07 +00:00
dependabot[bot] da184bc66d Bump raven-actions/actionlint from 2.0.1 to 2.1.0 (#401)
Bumps [raven-actions/actionlint](https://github.com/raven-actions/actionlint) from 2.0.1 to 2.1.0.
- [Release notes](https://github.com/raven-actions/actionlint/releases)
- [Commits](https://github.com/raven-actions/actionlint/compare/v2.0.1...v2.1.0)

---
updated-dependencies:
- dependency-name: raven-actions/actionlint
  dependency-version: 2.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-28 13:33:52 +00:00
GitHub Actions 566deebc64 Automation: update setup-beam version output to b94e7d3 2025-10-01 11:13:33 +00:00
Loïc Hoguin b94e7d372a Allow for Windows'25 container (#388) 2025-10-01 13:12:32 +02:00
GitHub Actions 033f103421 Automation: update setup-beam version output to 9afaa6e 2025-07-21 17:28:20 +00:00
dependabot[bot] 9afaa6e45f Bump csv-parse from 6.0.0 to 6.1.0 (#366)
---
updated-dependencies:
- dependency-name: csv-parse
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 18:28:00 +01:00
GitHub Actions 4168d0bf3c Automation: update setup-beam version output to 8c38699 2025-07-15 00:44:26 +00:00
dependabot[bot] 8c38699ca8 Bump @eslint/js from 9.30.1 to 9.31.0 (#363)
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.30.1 to 9.31.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.31.0/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.31.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-15 01:44:10 +01:00
GitHub Actions df4a3eca5d Automation: update setup-beam version output to db4f13c 2025-07-15 00:43:33 +00:00
dependabot[bot] db4f13ce18 Bump csv-parse from 5.6.0 to 6.0.0 (#364)
* Bump csv-parse from 5.6.0 to 6.0.0

Bumps [csv-parse](https://github.com/adaltas/node-csv/tree/HEAD/packages/csv-parse) from 5.6.0 to 6.0.0.
- [Changelog](https://github.com/adaltas/node-csv/blob/master/packages/csv-parse/CHANGELOG.md)
- [Commits](https://github.com/adaltas/node-csv/commits/csv-parse@6.0.0/packages/csv-parse)

---
updated-dependencies:
- dependency-name: csv-parse
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Help Dependabot: push `npm run build-dist`'s results

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
2025-07-15 01:43:16 +01:00
GitHub Actions 1df7f7a827 Automation: update setup-beam version output to f350bf9 2025-07-14 18:59:45 +00:00
dependabot[bot] f350bf9e05 Bump eslint from 9.30.1 to 9.31.0 (#365)
Bumps [eslint](https://github.com/eslint/eslint) from 9.30.1 to 9.31.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.30.1...v9.31.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.31.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-14 19:59:29 +01:00
GitHub Actions e6d7c94229 Automation: update setup-beam version output to fceaea9 2025-07-10 15:21:07 +00:00
Paulo F. Oliveira fceaea9f54 Fix: more versioning around nightly and maint/main (#359)
* Test Elixir main-otp-28 / Erlang maint-28

* Test Gleam nightly / OTP 28

* Tweak versioning

1. stop trying to "coerce" versions on input
2. handle `OTP-` in one more place
3. handle `nightly`

* Remove tests that should be failing previously

There is no strict 27 for macos-15, for example

* Remove similar tests

We'll test once per platform in similar conditions

* `await` for `assert.rejects` (not noticeable if alone inside `it`)

* Test maint- for strict and loose
2025-07-10 16:20:49 +01:00
GitHub Actions 2bb5b653d0 Automation: update setup-beam version output to 1d4efdd 2025-07-10 15:18:41 +00:00
dependabot[bot] 1d4efdd2e9 Bump globals from 16.2.0 to 16.3.0 (#361)
Bumps [globals](https://github.com/sindresorhus/globals) from 16.2.0 to 16.3.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v16.2.0...v16.3.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 16.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-10 16:18:18 +01:00
GitHub Actions 73f047e328 Automation: update setup-beam version output to 6dd8a1a 2025-07-10 09:38:56 +00:00
dependabot[bot] 6dd8a1a852 Bump @eslint/js from 9.30.0 to 9.30.1 (#360)
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.30.0 to 9.30.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.30.1/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.30.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-10 10:38:37 +01:00
GitHub Actions fd9a2e183f Automation: update setup-beam version output to 65085e3 2025-07-10 09:14:46 +00:00
dependabot[bot] 65085e37bc Bump eslint from 9.30.0 to 9.30.1 (#362)
Bumps [eslint](https://github.com/eslint/eslint) from 9.30.0 to 9.30.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.30.0...v9.30.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.30.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-10 10:14:28 +01:00
GitHub Actions 80c1659516 Automation: update setup-beam version output to 8e7fdef 2025-07-03 18:12:11 +00:00
GitHub Actions 8e7fdef09f Automation: update setup-beam version output to 1fe9179 2025-07-03 16:35:25 +00:00
Paulo F. Oliveira 1fe9179886 Handle .tool-versions' line break on Windows (#357)
* Test .tool-version on top of Windows

* Parse .tool-version with Windows-style line endings
2025-07-03 17:35:06 +01:00
GitHub Actions 6389fe58dc Automation: update setup-beam version output to 8fc1380 2025-07-01 21:13:33 +00:00
Paulo F. Oliveira 8fc1380bb7 Fix calculating -otp- major for Elixir (#351)
* Set expectations

* Ease testing without having to install via `require`

* Code a solution for the tests

* Avoid errors on unit tests

rebar3 is saying something about SSL, most likely because
our tests are installing a bunch of OTPs which makes
for unpredictable behavior

* Avoid errors on integration tests
2025-07-01 22:13:13 +01:00
GitHub Actions 3c915dd1b0 Automation: update setup-beam version output to e5d5058 2025-06-30 21:26:33 +00:00
dependabot[bot] e5d50587ee Bump @eslint/js from 9.29.0 to 9.30.0 (#352)
Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.29.0 to 9.30.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/commits/v9.30.0/packages/js)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 9.30.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-30 22:26:13 +01:00
GitHub Actions b1273cf7cc Automation: update setup-beam version output to 9308caf 2025-06-30 21:10:39 +00:00
dependabot[bot] 9308cafcbf Bump prettier from 3.6.0 to 3.6.2 (#353)
Bumps [prettier](https://github.com/prettier/prettier) from 3.6.0 to 3.6.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.6.0...3.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.6.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-30 22:09:53 +01:00
dependabot[bot] 2971b073e5 Bump eslint from 9.29.0 to 9.30.0 (#354)
Bumps [eslint](https://github.com/eslint/eslint) from 9.29.0 to 9.30.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.29.0...v9.30.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.30.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-30 22:09:35 +01:00
GitHub Actions a0b139a890 Automation: update setup-beam version output to 6a38171 2025-06-26 19:39:33 +00:00
Paulo F. Oliveira 6a38171948 Test for updated doc. on latest / ranges / -rc (#349)
* Set the expectations

* Reason on the past

* Also allow for removal of OTP- in comparison to RC

* Test it on what makes sense

* For known elements don't compare with ranges

* Don't put maint-27 alongside 27 in the initial map

* Generate the dist

* Revisit the whole latest vs. rc- vs. strict definition
2025-06-26 20:39:15 +01:00
GitHub Actions 75edbb8287 Automation: update setup-beam version output to a8bc27e 2025-06-24 23:13:55 +00:00
Paulo F. Oliveira a8bc27ec39 Add back deprecated runners with warning (#348)
Add back deprecated elements, with a warning on support/maintenance
2025-06-25 00:13:39 +01:00
18 changed files with 37267 additions and 15155 deletions
+48 -18
View File
@@ -24,7 +24,7 @@ jobs:
permissions: permissions:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- name: Version it! - name: Version it!
run: | run: |
# We expect a string such as const setupBeamVersion = 'undefined' in the code # We expect a string such as const setupBeamVersion = 'undefined' in the code
@@ -45,10 +45,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main' if: github.ref != 'refs/heads/main'
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v4.4.0 - uses: actions/setup-node@v6.3.0
with: with:
node-version: '20' node-version: '24'
- run: npm run build-dist - run: npm run build-dist
- name: Check if build left artifacts - name: Check if build left artifacts
run: git diff --exit-code --ignore-space-at-eol run: git diff --exit-code --ignore-space-at-eol
@@ -58,45 +58,75 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main' if: github.ref != 'refs/heads/main'
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- uses: raven-actions/actionlint@v2.0.1 - uses: raven-actions/actionlint@v2.1.2
unit_tests_ubuntu: unit_tests_ubuntu:
name: Unit tests (Ubuntu) name: Unit tests (Ubuntu)
runs-on: ubuntu-latest strategy:
matrix:
os:
- ubuntu-24.04-arm # ARM64
- ubuntu-latest # x86_64
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v4.4.0 - uses: actions/setup-node@v6.3.0
with: with:
node-version: '20' node-version: '24'
- run: npm ci - run: npm ci
- run: npm test - run: npm test
env:
NODE_ENV: test
- name: .tool-versions test - name: .tool-versions test
id: setup-beam id: setup-beam
uses: ./ uses: ./
with: with:
install-rebar: false install-rebar: false
install-hex: false
version-file: test/.tool-versions version-file: test/.tool-versions
version-type: strict version-type: strict
unit_tests_windows: unit_tests_windows:
name: Unit tests (Windows) name: Unit tests (Windows)
runs-on: windows-latest strategy:
matrix:
os:
- windows-11-arm # ARM64
- windows-latest # x86_64
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v4.4.0 - uses: actions/setup-node@v6.3.0
with: with:
node-version: '20' node-version: '24'
- run: npm install --production - run: npm install --production
- run: npm test - run: npm test
env:
NODE_ENV: test
- name: .tool-versions test
id: setup-beam
uses: ./
with:
install-rebar: false
install-hex: false
version-file: test/.tool-versions
version-type: strict
unit_tests_macos: unit_tests_macos:
name: Unit tests (macOS) name: Unit tests (macOS)
runs-on: macos-latest strategy:
matrix:
os:
- macos-latest # ARM64
- macos-15-intel # x86_64
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v4.4.0 - uses: actions/setup-node@v6.3.0
with: with:
node-version: '20' node-version: '24'
- run: npm ci - run: npm ci
- run: npm test - run: npm test
env:
NODE_ENV: test
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
install-rebar: [true, false] install-rebar: [true, false]
install-hex: [true, false] install-hex: [true, false]
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- name: Use erlef/setup-beam - name: Use erlef/setup-beam
id: setup-beam id: setup-beam
uses: ./ uses: ./
+5 -8
View File
@@ -43,14 +43,11 @@ jobs:
elixir-version: '1.14.3' elixir-version: '1.14.3'
os: 'macos-latest' os: 'macos-latest'
version-type: 'strict' version-type: 'strict'
- otp-version: '27'
os: 'macos-15'
version-type: 'strict'
- otp-version: '26'
os: 'macos-15'
version-type: 'strict'
- otp-version: '25' - otp-version: '25'
os: 'macos-15' os: 'macos-15'
- otp-version: '27'
elixir-version: '1.18'
os: 'macos-26'
- otp-version: '26' - otp-version: '26'
elixir-version: '1.16' elixir-version: '1.16'
rebar3-version: '3.25' rebar3-version: '3.25'
@@ -71,7 +68,7 @@ jobs:
rebar3-version: 'latest' rebar3-version: 'latest'
os: 'macos-latest' os: 'macos-latest'
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- name: Use erlef/setup-beam - name: Use erlef/setup-beam
id: setup-beam id: setup-beam
uses: ./ uses: ./
@@ -124,7 +121,7 @@ jobs:
rebar3-version: 3.24 rebar3-version: 3.24
os: macos-latest os: macos-latest
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- name: Use erlef/setup-beam - name: Use erlef/setup-beam
id: setup-beam id: setup-beam
uses: ./ uses: ./
+11 -8
View File
@@ -25,6 +25,15 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
combo: combo:
- otp-version: '<26'
elixir-version: '<1.17'
os: 'ubuntu-22.04'
- otp-version: 'master'
elixir-version: '> 0'
os: 'ubuntu-24.04'
- otp-version: 'master'
elixir-version: 'main'
os: 'ubuntu-24.04'
- otp-version: '27' - otp-version: '27'
elixir-version: 'v1.17.0' elixir-version: 'v1.17.0'
rebar3-version: '3.23' rebar3-version: '3.23'
@@ -44,12 +53,6 @@ jobs:
elixir-version: '1.14.3' elixir-version: '1.14.3'
os: 'ubuntu-latest' os: 'ubuntu-latest'
version-type: 'strict' version-type: 'strict'
- otp-version: '27'
os: 'ubuntu-24.04'
version-type: 'strict'
- otp-version: '26'
os: 'ubuntu-24.04'
version-type: 'strict'
- otp-version: '25' - otp-version: '25'
os: 'ubuntu-24.04' os: 'ubuntu-24.04'
- otp-version: '26' - otp-version: '26'
@@ -83,7 +86,7 @@ jobs:
escript_script: 'protoc-gen-elixir --version' escript_script: 'protoc-gen-elixir --version'
os: 'ubuntu-latest' os: 'ubuntu-latest'
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- name: Use erlef/setup-beam - name: Use erlef/setup-beam
id: setup-beam id: setup-beam
uses: ./ uses: ./
@@ -151,7 +154,7 @@ jobs:
rebar3-version: 3.24 rebar3-version: 3.24
os: ubuntu-latest os: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- name: Use erlef/setup-beam - name: Use erlef/setup-beam
id: setup-beam id: setup-beam
uses: ./ uses: ./
@@ -3,6 +3,7 @@ name: Update 3rd party licenses (automation)
permissions: permissions:
contents: write contents: write
pull-requests: write
on: on:
schedule: schedule:
@@ -14,7 +15,7 @@ jobs:
name: Update 3rd party licenses name: Update 3rd party licenses
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- run: - run:
./.github/workflows/update_3rd_party_licenses.sh ./.github/workflows/update_3rd_party_licenses.sh
env: env:
+8 -2
View File
@@ -25,6 +25,12 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
combo: combo:
- otp-version: '<26'
elixir-version: '<1.17'
os: 'ubuntu-22.04'
- otp-version: 'master'
elixir-version: '> 0'
os: 'ubuntu-24.04'
- otp-version: '27' - otp-version: '27'
elixir-version: 'v1.17.0' elixir-version: 'v1.17.0'
rebar3-version: '3.23' rebar3-version: '3.23'
@@ -64,7 +70,7 @@ jobs:
escript_script: 'protoc-gen-elixir --version' escript_script: 'protoc-gen-elixir --version'
os: 'windows-latest' os: 'windows-latest'
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- name: Use erlef/setup-beam - name: Use erlef/setup-beam
id: setup-beam id: setup-beam
uses: ./ uses: ./
@@ -131,7 +137,7 @@ jobs:
rebar3-version: 3.24 rebar3-version: 3.24
os: windows-latest os: windows-latest
steps: steps:
- uses: actions/checkout@v4.2.2 - uses: actions/checkout@v6.0.2
- name: Use erlef/setup-beam - name: Use erlef/setup-beam
id: setup-beam id: setup-beam
uses: ./ uses: ./
+4 -2
View File
@@ -1,2 +1,4 @@
node_modules/** /node_modules
test/.tool-versions /test/.tool-versions
/test/mise.toml
/dist/package.json
+1170 -6912
View File
File diff suppressed because it is too large Load Diff
+60 -18
View File
@@ -53,19 +53,25 @@ end up being parsed as `23`, which is not equivalent.
#### Pre-release versions #### Pre-release versions
For pre-release versions, such as `v1.11.0-rc.0`, use the full version To use a pre-release version such as `v1.11.0-rc.0`, specify the exact version
specifier (`v1.11.0-rc.0`) and set option `version-type` to `strict`. Pre-release versions are (`v1.11.0-rc.0`) and set `version-type` to `strict`.
opt-in, so `1.11.x` will not match a pre-release. Note that pre-release versions are opt-in by default.
Patterns like `1.11.x` do not include pre-release versions unless `latest` is specified.
#### "Latest" versions #### "Latest" versions
Set a tool's version to `latest` to retrieve the latest version of a given tool. To retrieve the most recent available version of a tool, set the version to `latest`.
The latest version is (locally) calculated by the action based on the (retrieved) versions This may include pre-release versions such as release candidates.
it knows (**note**: it is not the same as [GitHub considers it](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository)
and some repositories might propose).
If in doubt do a test run and compare the obtained release with the one you were expecting to If you want to target only the latest stable release and exclude pre-releases, use a
be the latest. version range like `> 0` instead.
Note that the `latest` version is determined locally by the action based on the versions it
has retrieved. This may differ from how [GitHub defines "latest"](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository),
and some repositories may present different interpretations.
If you're unsure, perform a test run and compare the resolved version against the version you
expect to be considered the latest.
### Compatibility between Operating System and Erlang/OTP ### Compatibility between Operating System and Erlang/OTP
@@ -78,13 +84,20 @@ and Erlang/OTP.
| `ubuntu-24.04` | 24.3 - 28 | x86_64, arm64 | ✅ | `ubuntu-24.04` | 24.3 - 28 | x86_64, arm64 | ✅
| `windows-2019` | 21\* - 25 | x86_64, x86 | ✅ | `windows-2019` | 21\* - 25 | x86_64, x86 | ✅
| `windows-2022` | 21\* - 28 | x86_64, x86 | ✅ | `windows-2022` | 21\* - 28 | x86_64, x86 | ✅
| `windows-2025` | 21\* - 28 | x86_64, x86 | ✅
| `macOS-13` | 25.0 - 28 | x86_64, arm64 | ✅ | `macOS-13` | 25.0 - 28 | x86_64, arm64 | ✅
| `macOS-14` | 25.0 - 28 | x86_64, arm64 | ✅ | `macOS-14` | 25.0 - 28 | x86_64, arm64 | ✅
| `macOS-15` | 25.0 - 28 | x86_64, arm64 | ✅ | `macOS-15` | 25.0 - 28 | x86_64, arm64 | ✅
| `macOS-26` | 25.0 - 28 | x86_64, arm64 | ✅
**Note** \*: prior to 23, Windows builds are only available for minor versions, e.g. 21.0, 21.3, **Note** \*: prior to 23, Windows builds are only available for minor versions, e.g. 21.0, 21.3,
22.0, etc. 22.0, etc.
### Compatibility between Erlang/OTP and rebar3
Check [version compatibility](https://github.com/erlang/rebar3?tab=readme-ov-file#compatibility-between-rebar3-and-erlangotp)
in `erlang/rebar3`.
### Self-hosted runners ### Self-hosted runners
Self-hosted runners need to set env. variable `ImageOS` to one of the following, since the action Self-hosted runners need to set env. variable `ImageOS` to one of the following, since the action
@@ -96,9 +109,11 @@ uses that to download assets:
| `ubuntu24` | `ubuntu-24.04` | `ubuntu24` | `ubuntu-24.04`
| `win19` | `windows-2019` | `win19` | `windows-2019`
| `win22` | `windows-2022` | `win22` | `windows-2022`
| `win25` | `windows-2025`
| `macos13` | `macOS-13` | `macos13` | `macOS-13`
| `macos14` | `macOS-14` | `macos14` | `macOS-14`
| `macos15` | `macOS-15` | `macos15` | `macOS-15`
| `macos26` | `macOS-26`
as per the following example: as per the following example:
@@ -133,23 +148,22 @@ e.g. `${{steps.setup-beam.outputs.erlang-version}}`
### Version file ### Version file
A version file is specified via input `version-file` (e.g.`.tool-versions`). This A version file is specified via input `version-file` (e.g. `.tool-versions` or `mise.toml`).
allows not having to use YML input for versions, though the action does check (and The file type is inferred from the filename: files ending in `.toml` are parsed as
[mise](https://mise.jdx.dev/configuration.html#tools-dev-tools) configuration, and all others
are parsed as [`.tool-versions`](https://asdf-vm.com/manage/configuration.html) (asdf format).
This allows not having to use YML input for versions, though the action does check (and
will exit with error) if both inputs are set. will exit with error) if both inputs are set.
**Note**: if you're using a version file, option `version-type` is checked to be `strict`, **Note**: if you're using a version file, option `version-type` is checked to be `strict`,
and will make the action exit with error otherwise. and will make the action exit with error otherwise.
The following version file formats are supported:
- `.tool-versions`, as specified by [asdf: Configuration](https://asdf-vm.com/manage/configuration.html)
Supported version elements are the same as the ones defined for the YML portion of the action, Supported version elements are the same as the ones defined for the YML portion of the action,
with the following correspondence. with the following correspondence.
#### `.tool-versions` format #### `.tool-versions` / `mise.toml` format
| YML | `.tool-versions` | YML | Version file key
|- |- |- |-
| `otp-version` | `erlang` | `otp-version` | `erlang`
| `elixir-version` | `elixir` | `elixir-version` | `elixir`
@@ -283,6 +297,34 @@ jobs:
- run: rebar3 ct - run: rebar3 ct
``` ```
### Compatibility
To execute matrix testing with specific dependency versions, configure the environment matrix to
use pinned, compatible releases:
```yaml
test:
runs-on: ${{matrix.compat.os}}
name: Erlang/OTP ${{matrix.compat.otp}} / rebar3 ${{matrix.compat.rebar3}}
strategy:
matrix:
compat:
- otp: "26.2.5.5"
rebar3: "3.22.1"
os: ubuntu-24.04
- otp: "27.1.2"
rebar3: "3.22.1"
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.compat.otp}}
rebar3-version: ${{matrix.compat.rebar3}}
version-type: strict
- run: rebar3 eunit
```
### Erlang/OTP + `rebar3`, on Windows ### Erlang/OTP + `rebar3`, on Windows
```yaml ```yaml
@@ -291,7 +333,7 @@ on: push
jobs: jobs:
test: test:
runs-on: windows-2022 runs-on: windows-2025
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: erlef/setup-beam@v1 - uses: erlef/setup-beam@v1
+4 -2
View File
@@ -69,7 +69,9 @@ inputs:
required: false required: false
version-file: version-file:
description: a versions file (e.g. as used by `asdf`), which defines inputs description: >-
a versions file (e.g. `.tool-versions` as used by `asdf`, or `mise.toml`
as used by `mise`), which defines inputs
default: '' default: ''
required: false required: false
@@ -96,5 +98,5 @@ outputs:
description: The commit unique id of the execution action version description: The commit unique id of the execution action version
runs: runs:
using: node20 using: node24
main: dist/index.js main: dist/index.js
+66
View File
@@ -0,0 +1,66 @@
{
"problemMatcher": [
{
"owner": "erlc-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(\\S+):(\\d+):(\\d+): [wW]arning: (.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
},
{
"owner": "erlc-error",
"severity": "error",
"pattern": [
{
"regexp": "^(\\S+):(\\d+):(\\d+): (?![wW]arning)(.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
},
{
"owner": "ct-failure",
"severity": "error",
"pattern": [
{
"regexp": "^(\\S+) failed on line (\\d+)$",
"file": 1,
"line": 2
},
{
"regexp": "^Reason: (.+)$",
"message": 1
}
]
},
{
"owner": "eunit-failure",
"severity": "error",
"pattern": [
{
"regexp": "^\\S+: .+\\.\\.\\.\\*failed\\*$"
},
{
"regexp": "^in function .+ \\((.+), line (\\d+)\\)$",
"file": 1,
"line": 2
},
{
"regexp": "^in call from .+$"
},
{
"regexp": "^\\*\\*error:(.+)$",
"message": 1
}
]
}
]
}
+33957 -6972
View File
File diff suppressed because one or more lines are too long
+19 -22
View File
@@ -1,30 +1,27 @@
import js from '@eslint/js' import js from '@eslint/js'
import globals from 'globals' import globals from 'globals'
import { defineConfig } from 'eslint/config' import yml from 'eslint-plugin-yml'
import eslintPluginYml from 'eslint-plugin-yml' import * as yamlParser from 'yaml-eslint-parser'
export default defineConfig([ export default [
...eslintPluginYml.configs['flat/recommended'], js.configs.recommended,
{ {
extends: ['js/recommended'], languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: globals.node,
},
},
{
files: ['**/*.yml'],
languageOptions: {
parser: yamlParser,
},
plugins: { plugins: {
js, yml,
}, },
languageOptions: { rules: {
ecmaVersion: 2022, ...yml.configs.recommended.rules,
globals: {
...globals.node,
},
}, },
}, },
{ ]
extends: eslintPluginYml.configs['flat/recommended'],
files: ['*.yml'],
languageOptions: {
parserOptions: {
parser: 'yaml-eslint-parser',
defaultYAMLVersion: '1.2',
},
},
},
])
+66
View File
@@ -0,0 +1,66 @@
{
"problemMatcher": [
{
"owner": "erlc-warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(\\S+):(\\d+):(\\d+): [wW]arning: (.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
},
{
"owner": "erlc-error",
"severity": "error",
"pattern": [
{
"regexp": "^(\\S+):(\\d+):(\\d+): (?![wW]arning)(.+)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
},
{
"owner": "ct-failure",
"severity": "error",
"pattern": [
{
"regexp": "^(\\S+) failed on line (\\d+)$",
"file": 1,
"line": 2
},
{
"regexp": "^Reason: (.+)$",
"message": 1
}
]
},
{
"owner": "eunit-failure",
"severity": "error",
"pattern": [
{
"regexp": "^\\S+: .+\\.\\.\\.\\*failed\\*$"
},
{
"regexp": "^in function .+ \\((.+), line (\\d+)\\)$",
"file": 1,
"line": 2
},
{
"regexp": "^in call from .+$"
},
{
"regexp": "^\\*\\*error:(.+)$",
"message": 1
}
]
}
]
}
+1268 -944
View File
File diff suppressed because it is too large Load Diff
+17 -15
View File
@@ -1,5 +1,6 @@
{ {
"name": "setup-beam", "name": "setup-beam",
"type": "module",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"scripts": { "scripts": {
@@ -16,25 +17,26 @@
"build-dist": "npm run clean-dist && npm install && npm run build && npm run format && npm run lint" "build-dist": "npm run clean-dist && npm install && npm run build && npm run format && npm run lint"
}, },
"dependencies": { "dependencies": {
"@actions/core": "1.11.1", "@actions/core": "3.0.0",
"@actions/exec": "1.1.1", "@actions/exec": "3.0.0",
"@actions/tool-cache": "2.0.2", "@actions/tool-cache": "4.0.0",
"csv-parse": "5.6.0", "csv-parse": "6.2.1",
"semver": "7.7.2", "lodash": "4.17.23",
"lodash": "4.17.21" "semver": "7.7.4",
"smol-toml": "1.6.1"
}, },
"devDependencies": { "devDependencies": {
"@vercel/ncc": "0.38.3", "@eslint/js": "10.0.1",
"eslint": "9.29.0", "@vercel/ncc": "0.38.4",
"@eslint/js": "9.29.0", "eslint": "10.1.0",
"globals": "16.2.0", "eslint-plugin-yml": "3.3.1",
"markdownlint-cli": "0.45.0", "globals": "17.4.0",
"prettier": "3.6.0", "markdownlint-cli": "0.48.0",
"shellcheck": "3.1.0", "prettier": "3.8.1",
"eslint-plugin-yml": "1.18.0", "shellcheck": "4.1.0",
"yarn": "1.22.22" "yarn": "1.22.22"
}, },
"engines": { "engines": {
"node": ">=20" "node": ">=24"
} }
} }
+234 -105
View File
@@ -1,18 +1,25 @@
const core = require('@actions/core') import path from 'node:path'
const { exec } = require('@actions/exec') import fs from 'node:fs'
const tc = require('@actions/tool-cache') import os from 'node:os'
const path = require('path') import { fileURLToPath } from 'node:url'
const semver = require('semver') import * as core from '@actions/core'
const fs = require('fs') import { exec } from '@actions/exec'
const os = require('os') import * as tc from '@actions/tool-cache'
const csv = require('csv-parse/sync') import * as semver from 'semver'
const _ = require('lodash') import * as csv from 'csv-parse/sync'
import _ from 'lodash'
import toml from 'smol-toml'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const MAX_HTTP_RETRIES = 3 const MAX_HTTP_RETRIES = 3
const APPS = ['erlang', 'elixir', 'gleam', 'rebar']
main().catch((err) => { if (process.env.NODE_ENV !== 'test') {
core.setFailed(err.message) main().catch((err) => {
}) core.setFailed(err.message)
})
}
async function main() { async function main() {
checkOtpArchitecture() checkOtpArchitecture()
@@ -28,15 +35,14 @@ async function main() {
versions = parseVersionFile(versionFilePath) versions = parseVersionFile(versionFilePath)
} }
const osVersion = getRunnerOSVersion()
const otpSpec = getInput('otp-version', true, 'erlang', versions) const otpSpec = getInput('otp-version', true, 'erlang', versions)
const elixirSpec = getInput('elixir-version', false, 'elixir', versions) const elixirSpec = getInput('elixir-version', false, 'elixir', versions)
const gleamSpec = getInput('gleam-version', false, 'gleam', versions) const gleamSpec = getInput('gleam-version', false, 'gleam', versions)
const rebar3Spec = getInput('rebar3-version', false, 'rebar', versions) const rebar3Spec = getInput('rebar3-version', false, 'rebar', versions)
if (otpSpec !== 'false') { if (otpSpec !== 'false') {
await installOTP(otpSpec, osVersion) await installOTP(otpSpec)
const elixirInstalled = await maybeInstallElixir(elixirSpec, otpSpec) const elixirInstalled = await maybeInstallElixir(elixirSpec)
if (elixirInstalled === true) { if (elixirInstalled === true) {
const shouldMixRebar = getInput('install-rebar', false) const shouldMixRebar = getInput('install-rebar', false)
await mix(shouldMixRebar, 'rebar') await mix(shouldMixRebar, 'rebar')
@@ -52,11 +58,12 @@ async function main() {
await maybeInstallRebar3(rebar3Spec) await maybeInstallRebar3(rebar3Spec)
// undefined is replaced by a function, post- main branch merge // undefined is replaced by a function, post- main branch merge
const setupBeamVersion = 'abd725c' const setupBeamVersion = '7a27046'
core.setOutput('setup-beam-version', setupBeamVersion) core.setOutput('setup-beam-version', setupBeamVersion)
} }
async function installOTP(otpSpec, osVersion) { async function installOTP(otpSpec) {
const osVersion = getRunnerOSVersion()
const otpVersion = await getOTPVersion(otpSpec, osVersion) const otpVersion = await getOTPVersion(otpSpec, osVersion)
core.startGroup( core.startGroup(
`Installing Erlang/OTP ${otpVersion} - built on ${getRunnerOSArchitecture()}/${osVersion}`, `Installing Erlang/OTP ${otpVersion} - built on ${getRunnerOSArchitecture()}/${osVersion}`,
@@ -73,15 +80,16 @@ async function installOTP(otpSpec, osVersion) {
}, },
}) })
core.setOutput('otp-version', otpVersion) core.setOutput('otp-version', otpVersion)
maybeEnableProblemMatchers('erlang')
core.endGroup() core.endGroup()
return otpVersion return otpVersion
} }
async function maybeInstallElixir(elixirSpec, otpSpec) { async function maybeInstallElixir(elixirSpec) {
let installed = false let installed = false
if (elixirSpec) { if (elixirSpec) {
const elixirVersion = await getElixirVersion(elixirSpec, otpSpec) const elixirVersion = await getElixirVersion(elixirSpec)
core.startGroup(`Installing Elixir ${elixirVersion}`) core.startGroup(`Installing Elixir ${elixirVersion}`)
await doWithMirrors({ await doWithMirrors({
hexMirrors: hexMirrorsInput(), hexMirrors: hexMirrorsInput(),
@@ -94,7 +102,7 @@ async function maybeInstallElixir(elixirSpec, otpSpec) {
}, },
}) })
core.setOutput('elixir-version', elixirVersion) core.setOutput('elixir-version', elixirVersion)
maybeEnableElixirProblemMatchers() maybeEnableProblemMatchers('elixir')
core.endGroup() core.endGroup()
installed = true installed = true
@@ -103,16 +111,18 @@ async function maybeInstallElixir(elixirSpec, otpSpec) {
return installed return installed
} }
function maybeEnableElixirProblemMatchers() { function problemMatchersEnabled() {
const disableProblemMatchers = getInput('disable_problem_matchers', false) return getInput('disable_problem_matchers', false) === 'false'
if (disableProblemMatchers === 'false') { }
const elixirMatchers = path.join(
__dirname, // path.join with static strings helps ncc resolve and bundle the JSON files
'..', function maybeEnableProblemMatchers(language) {
'matchers', if (problemMatchersEnabled()) {
'elixir-matchers.json', const matcherFiles = {
) erlang: path.join(`${__dirname}/../matchers/erlang-matchers.json`),
core.info(`##[add-matcher]${elixirMatchers}`) elixir: path.join(`${__dirname}/../matchers/elixir-matchers.json`),
}
core.info(`##[add-matcher]${matcherFiles[language]}`)
} }
} }
@@ -168,10 +178,14 @@ async function maybeInstallRebar3(rebar3Spec) {
return installed return installed
} }
function maybeRemoveOTPPrefix(otpSpec) {
return otpSpec.replace(/^OTP-/, '')
}
async function getOTPVersion(otpSpec0, osVersion) { async function getOTPVersion(otpSpec0, osVersion) {
const [otpVersions, originListing, hexMirrors] = const [otpVersions, originListing, hexMirrors] =
await getOTPVersions(osVersion) await getOTPVersions(osVersion)
let spec = otpSpec0.replace(/^OTP-/, '') let spec = maybeRemoveOTPPrefix(otpSpec0)
const versions = otpVersions const versions = otpVersions
const otpVersion = getVersionFromSpec(spec, versions) const otpVersion = getVersionFromSpec(spec, versions)
@@ -185,26 +199,50 @@ async function getOTPVersion(otpSpec0, osVersion) {
} }
function requestedVersionFor(tool, version, originListing, mirrors) { function requestedVersionFor(tool, version, originListing, mirrors) {
return ( const isVersionTypeStrict = isStrictVersion()
`Requested ${tool} version (${version}) not found in version list, ` +
`at ${originListing}${mirrors ? `, with mirrors ${mirrors}` : ''}; ` + let versionType = 'loose'
"should you be using option 'version-type': 'strict'?" if (isVersionTypeStrict) {
) versionType = 'strict'
}
let ret =
`Requested ${versionType} ${tool} version (${version}) not found in version list, ` +
`at ${originListing}${mirrors ? `, with mirrors ${mirrors}` : ''}.`
if (!isVersionTypeStrict) {
ret = `${ret} Should you be using option 'version-type': 'strict'?`
}
return ret
} }
const knownBranches = ['main', 'master', 'maint'] const knownBranches = ['main', 'master', 'maint']
const nonSpecificVersions = ['nightly', 'latest'] const nonSpecificVersions = ['nightly', 'latest']
async function getElixirVersion(exSpec0, otpVersion0) { async function getElixirVersion(exSpec0) {
const otpVersion = otpVersion0.match(/^(?:OTP-)?(.+)$/)[1]
const regex = `^(\\d{1,3}|${knownBranches.join('|')}|${nonSpecificVersions.join('|')})?.*$`
let otpVersionMajor = otpVersion.match(new RegExp(regex))[1]
const otpSuffix = /-otp-(\d+)/ const otpSuffix = /-otp-(\d+)/
const userSuppliedOtp = exSpec0.match(otpSuffix)?.[1] ?? null const userSuppliedOtp = exSpec0.match(otpSuffix)?.[1] ?? null
let otpVersionMajor = ''
if (userSuppliedOtp && isVersion(userSuppliedOtp)) { if (userSuppliedOtp && isVersion(userSuppliedOtp)) {
otpVersionMajor = userSuppliedOtp otpVersionMajor = userSuppliedOtp
} else {
let cmd = 'erl'
if (process.platform === 'win32') {
cmd = 'erl.exe'
}
const args = [
'-noshell',
'-eval',
'io:format(erlang:system_info(otp_release)), halt().',
]
await exec(cmd, args, {
listeners: {
stdout: (data) => {
otpVersionMajor = data.toString()
},
},
})
} }
const [otpVersionsForElixirMap, elixirVersions, originListing, hexMirrors] = const [otpVersionsForElixirMap, elixirVersions, originListing, hexMirrors] =
@@ -219,17 +257,29 @@ async function getElixirVersion(exSpec0, otpVersion0) {
) )
} }
const elixirVersionComp = otpVersionsForElixirMap[elixirVersionFromSpec] let foundCombo = false
if ( let otpVersionMajorIter = parseInt(otpVersionMajor)
(elixirVersionComp && elixirVersionComp.includes(otpVersionMajor)) || let otpVersionsMajor = []
!isVersion(otpVersionMajor) while (otpVersionMajorIter > otpVersionMajor - 3) {
) { otpVersionMajorIter += ''
core.info( otpVersionsMajor.push(otpVersionMajorIter)
`Using Elixir ${elixirVersionFromSpec} (built for Erlang/OTP ${otpVersionMajor})`, const elixirVersionComp = otpVersionsForElixirMap[elixirVersionFromSpec]
) if (
} else { (elixirVersionComp && elixirVersionComp.includes(otpVersionMajorIter)) ||
!isVersion(otpVersionMajorIter)
) {
core.info(
`Using Elixir ${elixirVersionFromSpec} (built for Erlang/OTP ${otpVersionMajorIter})`,
)
foundCombo = true
break
}
otpVersionMajorIter = parseInt(otpVersionMajorIter) - 1
}
if (!foundCombo) {
throw new Error( throw new Error(
`Requested Elixir / Erlang/OTP version (${exSpec0} / ${otpVersion0}) not ` + `Requested Elixir / Erlang/OTP version (${exSpec0} / tried ${otpVersionsMajor}) not ` +
'found in version list (did you check Compatibility between Elixir and Erlang/OTP?).' + 'found in version list (did you check Compatibility between Elixir and Erlang/OTP?).' +
'Elixir and Erlang/OTP compatibility can be found at: ' + 'Elixir and Erlang/OTP compatibility can be found at: ' +
'https://hexdocs.pm/elixir/compatibility-and-deprecations.html', 'https://hexdocs.pm/elixir/compatibility-and-deprecations.html',
@@ -238,8 +288,8 @@ async function getElixirVersion(exSpec0, otpVersion0) {
let elixirVersionForDownload = elixirVersionFromSpec let elixirVersionForDownload = elixirVersionFromSpec
if (isVersion(otpVersionMajor)) { if (isVersion(otpVersionMajorIter)) {
elixirVersionForDownload = `${elixirVersionFromSpec}-otp-${otpVersionMajor}` elixirVersionForDownload = `${elixirVersionFromSpec}-otp-${otpVersionMajorIter}`
} }
return maybePrependWithV(elixirVersionForDownload) return maybePrependWithV(elixirVersionForDownload)
@@ -321,12 +371,9 @@ async function getOTPVersions(osVersion) {
.trim() .trim()
.split('\n') .split('\n')
.forEach((line) => { .forEach((line) => {
const otpMatch = line const otpVersionOrig = line.match(/^([^ ]+)?( .+)/)[1]
.match(/^([^ ]+)?( .+)/)[1] const otpVersion = maybeRemoveOTPPrefix(otpVersionOrig)
.match(/^([^-]+-)?(.+)$/) debugLog('OTP line and parsing', [line, otpVersion, otpVersionOrig])
const otpVersion = otpMatch[2]
const otpVersionOrig = otpMatch[0]
debugLog('OTP line and parsing', [line, otpVersion, otpMatch])
otpVersions[otpVersion] = otpVersionOrig // we keep the original for later reference otpVersions[otpVersion] = otpVersionOrig // we keep the original for later reference
}) })
} else if (process.platform === 'win32') { } else if (process.platform === 'win32') {
@@ -340,10 +387,10 @@ async function getOTPVersions(osVersion) {
.flat() .flat()
.filter((x) => x.name.match(file_regex)) .filter((x) => x.name.match(file_regex))
.forEach((x) => { .forEach((x) => {
const otpMatch = x.name.match(file_regex) const otpVersionOrig = x.name.match(file_regex)[1]
const otpVersion = otpMatch[1] const otpVersion = otpVersionOrig
debugLog('OTP line and parsing', [otpMatch, otpVersion]) debugLog('OTP line and parsing', [x.name, otpVersion, otpVersionOrig])
otpVersions[otpVersion] = otpVersion otpVersions[otpVersion] = otpVersionOrig
}) })
}) })
} else if (process.platform === 'darwin') { } else if (process.platform === 'darwin') {
@@ -352,10 +399,9 @@ async function getOTPVersions(osVersion) {
columns: true, columns: true,
}) })
.forEach((line) => { .forEach((line) => {
const otpMatch = line.ref_name.match(/^([^-]+-)?(.+)$/) const otpVersionOrig = line.ref_name
const otpVersion = otpMatch[2] const otpVersion = maybeRemoveOTPPrefix(otpVersionOrig)
const otpVersionOrig = otpMatch[0] debugLog('OTP line and parsing', [line, otpVersion, otpVersionOrig])
debugLog('OTP line and parsing', [line, otpVersion, otpMatch])
otpVersions[otpVersion] = otpVersionOrig // we keep the original for later reference otpVersions[otpVersion] = otpVersionOrig // we keep the original for later reference
}) })
} }
@@ -448,6 +494,7 @@ function validVersion(v) {
v.match( v.match(
new RegExp(`${knownBranches.join('|')}|${nonSpecificVersions.join('|')}`), new RegExp(`${knownBranches.join('|')}|${nonSpecificVersions.join('|')}`),
) == null && ) == null &&
// these ones are for rebar3, which has alpha and beta releases
!v.startsWith('a') && !v.startsWith('a') &&
!v.startsWith('b') !v.startsWith('b')
) )
@@ -474,8 +521,14 @@ function getVersionFromSpec(spec0, versions0) {
const altVersions = {} const altVersions = {}
Object.entries(versions0).forEach(([version, altVersion]) => { Object.entries(versions0).forEach(([version, altVersion]) => {
let coerced let coerced
if (isStrictVersion() || isRC(version)) { if (
// If `version-type: strict` or version is RC, we just try to remove a potential initial v isStrictVersion() ||
isRC(version) ||
isKnownBranch(version) ||
isKnownVerBranch(version)
) {
// If `version-type: strict`, version is an RC, or version is "a branch"
// we just try to remove a potential initial v
coerced = maybeRemoveVPrefix(version) coerced = maybeRemoveVPrefix(version)
} else { } else {
// Otherwise, we place the version into a version bucket // Otherwise, we place the version into a version bucket
@@ -492,13 +545,19 @@ function getVersionFromSpec(spec0, versions0) {
const rangeMax = semver.maxSatisfying(versions, rangeForMax) const rangeMax = semver.maxSatisfying(versions, rangeForMax)
let version = null let version = null
if (isStrictVersion() || isRC(spec0) || isKnownBranch(spec0)) { if (spec0 === 'latest') {
version = versions0[versions0.latest]
} else if (
isStrictVersion() ||
isRC(spec0) ||
isKnownBranch(spec0) ||
isKnownVerBranch(spec0) ||
spec0 === 'nightly'
) {
if (versions0[spec]) { if (versions0[spec]) {
// If `version-type: strict` or version is RC, we obtain it directly // We obtain it directly
version = versions0[spec] version = versions0[spec]
} }
} else if (spec0 === 'latest') {
version = versions0[versions0.latest]
} else if (rangeMax !== null) { } else if (rangeMax !== null) {
// Otherwise, we compare alt. versions' semver ranges to this version, from highest to lowest // Otherwise, we compare alt. versions' semver ranges to this version, from highest to lowest
const thatVersion = spec const thatVersion = spec
@@ -525,7 +584,7 @@ function getVersionFromSpec(spec0, versions0) {
} }
function maybeCoerced(v) { function maybeCoerced(v) {
let ret = null let ret
try { try {
if (!isRC(v)) { if (!isRC(v)) {
ret = semver.coerce(v).version ret = semver.coerce(v).version
@@ -605,23 +664,42 @@ function getRunnerOSVersion() {
const ImageOSToContainer = { const ImageOSToContainer = {
ubuntu22: 'ubuntu-22.04', ubuntu22: 'ubuntu-22.04',
ubuntu24: 'ubuntu-24.04', ubuntu24: 'ubuntu-24.04',
'win11-arm64': 'windows-11-arm',
win19: 'windows-2019', win19: 'windows-2019',
win22: 'windows-2022', win22: 'windows-2022',
win25: 'windows-2025',
macos13: 'macOS-13', macos13: 'macOS-13',
macos14: 'macOS-14', macos14: 'macOS-14',
macos15: 'macOS-15', macos15: 'macOS-15',
macos26: 'macOS-26',
}
const deprecatedImageOSToContainer = {
ubuntu18: 'ubuntu-18.04',
ubuntu20: 'ubuntu-20.04',
} }
const containerFromEnvImageOS = ImageOSToContainer[process.env.ImageOS] const containerFromEnvImageOS = ImageOSToContainer[process.env.ImageOS]
if (!containerFromEnvImageOS) { if (!containerFromEnvImageOS) {
throw new Error( const deprecatedContainerFromEnvImageOS =
"Tried to map a target OS from env. variable 'ImageOS' (got " + deprecatedImageOSToContainer[process.env.ImageOS]
`${process.env.ImageOS}` + if (deprecatedContainerFromEnvImageOS) {
"), but failed. If you're using a " + core.warning(
"self-hosted runner, you should set 'env': 'ImageOS': ... to one of the following: " + `You are using deprecated ImageOS ${deprecatedContainerFromEnvImageOS}. ` +
"['" + 'Support for maintenance is very limited. Consider a non-deprecated version as ' +
`${Object.keys(ImageOSToContainer).join("', '")}` + 'mentioned in the README.md.',
"']", )
)
return deprecatedContainerFromEnvImageOS
} else {
throw new Error(
"Tried to map a target OS from env. variable 'ImageOS' (got " +
`${process.env.ImageOS}` +
"), but failed. If you're using a " +
"self-hosted runner, you should set 'env': 'ImageOS': ... to one of the following: " +
"['" +
`${Object.keys(ImageOSToContainer).join("', '")}` +
"']",
)
}
} }
return containerFromEnvImageOS return containerFromEnvImageOS
@@ -701,7 +779,7 @@ function xyzAbcVersion(pref, suf) {
// https://www.erlang.org/doc/system_principles/versions.html // https://www.erlang.org/doc/system_principles/versions.html
const dd = '\\.?(\\d+)?' const dd = '\\.?(\\d+)?'
return new RegExp( return new RegExp(
`${pref}v?(\\d+)${dd}${dd}${dd}${dd}${dd}(?:-rc\\.?\\d+)?(?:-otp-\\d+)?${suf}`, `${pref}(?:OTP-)?v?(\\d+)${dd}${dd}${dd}${dd}${dd}(?:-rc\\.?\\d+)?(?:-otp-\\d+)?${suf}`,
) )
} }
@@ -733,28 +811,14 @@ alongside ${alternativeName}=${alternativeValue} \
return input return input
} }
function parseVersionFile(versionFilePath0) { function parseToolVersionsFile(versionFilePath) {
const versionFilePath = path.resolve(
process.env.GITHUB_WORKSPACE,
versionFilePath0,
)
if (!fs.existsSync(versionFilePath)) {
throw new Error(
`The specified version file, ${versionFilePath0}, does not exist`,
)
}
core.startGroup(`Parsing version file at ${versionFilePath0}`)
const appVersions = new Map() const appVersions = new Map()
const versions = fs.readFileSync(versionFilePath, 'utf8') const versions = fs.readFileSync(versionFilePath, 'utf8')
// For the time being we parse .tool-versions versions.split(/\r?\n/).forEach((line) => {
// If we ever start parsing something else, this should
// become default in a new option named e.g. version-file-type
versions.split('\n').forEach((line) => {
const appVersion = line.match(/^([^ ]+)[ ]+(ref:v?)?([^ #]+)/) const appVersion = line.match(/^([^ ]+)[ ]+(ref:v?)?([^ #]+)/)
if (appVersion) { if (appVersion) {
const app = appVersion[1] const app = appVersion[1]
if (['erlang', 'elixir', 'gleam', 'rebar'].includes(app)) { if (APPS.includes(app)) {
const [, , , version] = appVersion const [, , , version] = appVersion
core.info(`Consuming ${app} at version ${version}`) core.info(`Consuming ${app} at version ${version}`)
appVersions.set(app, version) appVersions.set(app, version)
@@ -771,6 +835,46 @@ function parseVersionFile(versionFilePath0) {
return appVersions return appVersions
} }
function parseMiseTomlFile(versionFilePath) {
const appVersions = new Map()
const miseToml = fs.readFileSync(versionFilePath, 'utf8')
const miseTomlParsed = toml.parse(miseToml)
for (const app in miseTomlParsed.tools) {
if (APPS.includes(app)) {
const appVersion = miseTomlParsed.tools[app]
const version =
typeof appVersion == 'object' ? appVersion.version : appVersion
core.info(`Consuming ${app} at version ${version}`)
appVersions.set(app, version)
}
}
return appVersions
}
function parseVersionFile(versionFilePath0) {
const versionFilePath = path.resolve(
process.env.GITHUB_WORKSPACE,
versionFilePath0,
)
if (!fs.existsSync(versionFilePath)) {
throw new Error(
`The specified version file, ${versionFilePath0}, does not exist`,
)
}
if (versionFilePath0.endsWith('.toml')) {
core.startGroup(
`Parsing ${path.basename(versionFilePath0)} file at ${versionFilePath0}`,
)
return parseMiseTomlFile(versionFilePath)
}
core.startGroup(`Parsing .tool-versions file at ${versionFilePath0}`)
return parseToolVersionsFile(versionFilePath)
}
function debugLog(groupName, message) { function debugLog(groupName, message) {
const group = `Debugging for ${groupName}` const group = `Debugging for ${groupName}`
core.debug( core.debug(
@@ -953,12 +1057,14 @@ async function install(toolName, opts) {
tool: 'Gleam', tool: 'Gleam',
linux: { linux: {
downloadToolURL: () => { downloadToolURL: () => {
const arch = getRunnerOSArchitecture()
let gz let gz
if ( if (
versionSpec === 'nightly' || versionSpec === 'nightly' ||
semver.gt(versionSpec, 'v0.22.1') semver.gt(versionSpec, 'v0.22.1')
) { ) {
gz = `gleam-${versionSpec}-x86_64-unknown-linux-musl.tar.gz` const target = arch === 'arm64' ? 'aarch64' : 'x86_64'
gz = `gleam-${versionSpec}-${target}-unknown-linux-musl.tar.gz`
} else { } else {
gz = `gleam-${versionSpec}-linux-amd64.tar.gz` gz = `gleam-${versionSpec}-linux-amd64.tar.gz`
} }
@@ -1022,7 +1128,26 @@ async function install(toolName, opts) {
}, },
}, },
} }
installOpts.darwin = installOpts.linux installOpts.darwin = {
downloadToolURL: () => {
const arch = getRunnerOSArchitecture()
let gz
if (versionSpec === 'nightly' || semver.gt(versionSpec, 'v0.22.1')) {
const target = arch === 'arm64' ? 'aarch64' : 'x86_64'
gz = `gleam-${versionSpec}-${target}-apple-darwin.tar.gz`
} else {
gz =
arch === 'arm64'
? `gleam-${versionSpec}-macos-arm64.tar.gz`
: `gleam-${versionSpec}-macos.tar.gz`
}
return `https://github.com/gleam-lang/gleam/releases/download/${versionSpec}/${gz}`
},
extract: installOpts.linux.extract,
postExtract: installOpts.linux.postExtract,
reportVersion: installOpts.linux.reportVersion,
}
break break
case 'rebar3': case 'rebar3':
installOpts = { installOpts = {
@@ -1169,15 +1294,19 @@ function debugLoggingEnabled() {
return !!process.env.RUNNER_DEBUG return !!process.env.RUNNER_DEBUG
} }
module.exports = { export default {
get, get,
getOTPVersion,
getElixirVersion, getElixirVersion,
getGleamVersion, getGleamVersion,
getOTPVersion,
getRebar3Version, getRebar3Version,
getVersionFromSpec, getVersionFromSpec,
githubAMDRunnerArchs, githubAMDRunnerArchs,
githubARMRunnerArchs, githubARMRunnerArchs,
install, install,
installOTP,
maybeInstallElixir,
maybeInstallGleam,
maybeInstallRebar3,
parseVersionFile, parseVersionFile,
} }
+327 -125
View File
@@ -1,3 +1,17 @@
import assert from 'node:assert'
import http from 'node:http'
import fs from 'node:fs'
import os from 'node:os'
import path from 'node:path'
import { describe, it } from 'node:test'
import * as csv from 'csv-parse/sync'
import elixirMatchers from '../matchers/elixir-matchers.json' with { type: 'json' }
import erlangMatchers from '../matchers/erlang-matchers.json' with { type: 'json' }
const { problemMatcher } = elixirMatchers
const { problemMatcher: erlangProblemMatcher } = erlangMatchers
process.env.NODE_ENV = 'test'
simulateInput('otp-version', '25.1.2') simulateInput('otp-version', '25.1.2')
simulateInput('otp-architecture', '64') simulateInput('otp-architecture', '64')
simulateInput('elixir-version', '1.14.2') simulateInput('elixir-version', '1.14.2')
@@ -7,15 +21,7 @@ simulateInput('install-hex', 'true')
simulateInput('github-token', process.env.GITHUB_TOKEN) simulateInput('github-token', process.env.GITHUB_TOKEN)
simulateInput('hexpm-mirrors', 'https://builds.hex.pm', { multiline: true }) simulateInput('hexpm-mirrors', 'https://builds.hex.pm', { multiline: true })
const assert = require('assert') const { default: setupBeam } = await import('../src/setup-beam.js')
const http = require('http')
const fs = require('fs')
const os = require('os')
const path = require('path')
const setupBeam = require('../src/setup-beam')
const { problemMatcher } = require('../matchers/elixir-matchers.json')
const { describe, it } = require('node:test')
const csv = require('csv-parse/sync')
const matrix = { const matrix = {
otp: { otp: {
@@ -75,7 +81,7 @@ describe('OTP install', () => {
const otpOSVersion = 'ubuntu-08.04' const otpOSVersion = 'ubuntu-08.04'
const otpVersion = 'OTP-23.2' const otpVersion = 'OTP-23.2'
assert.rejects( await assert.rejects(
async () => { async () => {
await setupBeam.install('otp', { await setupBeam.install('otp', {
hexMirror: 'https://builds.hex.pm', hexMirror: 'https://builds.hex.pm',
@@ -95,7 +101,7 @@ describe('OTP install', () => {
describe('Elixir install', () => { describe('Elixir install', () => {
it('fails for version 0.11 without OTP', async () => { it('fails for version 0.11 without OTP', async () => {
const exVersion = '0.11' const exVersion = '0.11'
assert.rejects( await assert.rejects(
async () => { async () => {
await setupBeam.install('elixir', { await setupBeam.install('elixir', {
hexMirror: 'https://builds.hex.pm', hexMirror: 'https://builds.hex.pm',
@@ -112,7 +118,7 @@ describe('Elixir install', () => {
it('fails for version 1.0.0 on OTP 17 (without OTP)', async () => { it('fails for version 1.0.0 on OTP 17 (without OTP)', async () => {
const exVersion = 'v1.0.0-otp-17' const exVersion = 'v1.0.0-otp-17'
assert.rejects( await assert.rejects(
async () => { async () => {
await setupBeam.install('elixir', { await setupBeam.install('elixir', {
hexMirror: 'https://builds.hex.pm', hexMirror: 'https://builds.hex.pm',
@@ -131,7 +137,7 @@ describe('Elixir install', () => {
describe('Gleam install', () => { describe('Gleam install', () => {
it('fails for unknown OTP', async () => { it('fails for unknown OTP', async () => {
const gleamVersion = '0.1.3' const gleamVersion = '0.1.3'
assert.rejects( await assert.rejects(
async () => { async () => {
await setupBeam.install('gleam', { gleamVersion }) await setupBeam.install('gleam', { gleamVersion })
}, },
@@ -147,7 +153,7 @@ describe('Gleam install', () => {
describe('rebar3 install', () => { describe('rebar3 install', () => {
it('fails for unknown OTP', async () => { it('fails for unknown OTP', async () => {
const r3Version = '0.14.4' const r3Version = '0.14.4'
assert.rejects( await assert.rejects(
async () => { async () => {
await setupBeam.install('rebar3', { r3Version }) await setupBeam.install('rebar3', { r3Version })
}, },
@@ -171,20 +177,9 @@ describe('.getOTPVersion(_) - Erlang', () => {
'https://repo.hex.pm, https://cdn.jsdelivr.net/hex', 'https://repo.hex.pm, https://cdn.jsdelivr.net/hex',
{ multiline: true }, { multiline: true },
) )
const previousRunnerArch = process.env.RUNNER_ARCH
if (process.platform === 'linux') { if (process.platform === 'linux') {
process.env.RUNNER_ARCH = 'X64'
it('is Ok for known linux version', async () => { it('is Ok for known linux version', async () => {
before = simulateInput('version-type', 'strict')
spec = '26'
osVersion = 'ubuntu-24.04'
expected = 'maint-26'
got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)
before = simulateInput('version-type', 'strict') before = simulateInput('version-type', 'strict')
spec = '27.0' spec = '27.0'
osVersion = 'ubuntu-24.04' osVersion = 'ubuntu-24.04'
@@ -201,21 +196,21 @@ describe('.getOTPVersion(_) - Erlang', () => {
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
simulateInput('version-type', before) simulateInput('version-type', before)
spec = '19.3.x' spec = '20.3.x'
osVersion = 'ubuntu-16.04' osVersion = 'ubuntu-20.04'
expected = 'OTP-19.3.6.13' expected = 'OTP-20.3.8.26'
got = await setupBeam.getOTPVersion(spec, osVersion) got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
spec = '^19.3.6' spec = '^20.3.8'
osVersion = 'ubuntu-16.04' osVersion = 'ubuntu-20.04'
expected = 'OTP-19.3.6.13' expected = 'OTP-20.3.8.26'
got = await setupBeam.getOTPVersion(spec, osVersion) got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
spec = '^19.3' spec = '^20.3'
osVersion = 'ubuntu-18.04' osVersion = 'ubuntu-20.04'
expected = 'OTP-19.3.6.13' expected = 'OTP-20.3.8.26'
got = await setupBeam.getOTPVersion(spec, osVersion) got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
@@ -309,19 +304,48 @@ describe('.getOTPVersion(_) - Erlang', () => {
} }
if (process.platform === 'linux') { if (process.platform === 'linux') {
it('is Ok for known linux ARM64 version', async () => { it('is main-... only if strict/maint-... is used as input', async () => {
const arm64Options = setupBeam.githubARMRunnerArchs() const arm64Options = setupBeam.githubARMRunnerArchs()
const previousRunnerArch = process.env.RUNNER_ARCH
process.env.RUNNER_ARCH = process.env.RUNNER_ARCH =
arm64Options[Math.floor(Math.random() * arm64Options.length)] arm64Options[Math.floor(Math.random() * arm64Options.length)]
before = simulateInput('version-type', 'strict') before = simulateInput('version-type', 'strict')
spec = '26' await assert.rejects(
osVersion = 'ubuntu-24.04' async () => {
expected = 'maint-26' await setupBeam.getOTPVersion('27', 'ubuntu-24.04')
got = await setupBeam.getOTPVersion(spec, osVersion) },
assert.deepStrictEqual(got, expected) (err) => {
assert.ok(err instanceof Error)
return true
},
`Fetching strict OTP version maint-<v> with input <v> is supposed to fail`,
)
simulateInput('version-type', before) simulateInput('version-type', before)
before = simulateInput('version-type', 'strict')
assert.strictEqual(
await setupBeam.getOTPVersion('maint-27', 'ubuntu-24.04'),
'maint-27',
)
simulateInput('version-type', before)
before = simulateInput('version-type', 'loose')
assert.strictEqual(
await setupBeam.getOTPVersion('maint-27', 'ubuntu-24.04'),
'maint-27',
)
simulateInput('version-type', before)
process.env.RUNNER_ARCH = previousRunnerArch
})
it('is Ok for known linux ARM64 version', async () => {
const arm64Options = setupBeam.githubARMRunnerArchs()
const previousRunnerArch = process.env.RUNNER_ARCH
process.env.RUNNER_ARCH =
arm64Options[Math.floor(Math.random() * arm64Options.length)]
before = simulateInput('version-type', 'strict') before = simulateInput('version-type', 'strict')
spec = '27.0' spec = '27.0'
osVersion = 'ubuntu-24.04' osVersion = 'ubuntu-24.04'
@@ -379,21 +403,16 @@ describe('.getOTPVersion(_) - Erlang', () => {
expected = 'master' expected = 'master'
got = await setupBeam.getOTPVersion(spec, osVersion) got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
process.env.RUNNER_ARCH = previousRunnerArch
}) })
it('is Ok for known linux AMD64 version', async () => { it('is Ok for known linux AMD64 version', async () => {
const amd64Options = setupBeam.githubAMDRunnerArchs() const amd64Options = setupBeam.githubAMDRunnerArchs()
const previousRunnerArch = process.env.RUNNER_ARCH
process.env.RUNNER_ARCH = process.env.RUNNER_ARCH =
amd64Options[Math.floor(Math.random() * amd64Options.length)] amd64Options[Math.floor(Math.random() * amd64Options.length)]
before = simulateInput('version-type', 'strict')
spec = '26'
osVersion = 'ubuntu-24.04'
expected = 'maint-26'
got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)
before = simulateInput('version-type', 'strict') before = simulateInput('version-type', 'strict')
spec = '27.0' spec = '27.0'
osVersion = 'ubuntu-24.04' osVersion = 'ubuntu-24.04'
@@ -469,12 +488,45 @@ describe('.getOTPVersion(_) - Erlang', () => {
expected = 'master' expected = 'master'
got = await setupBeam.getOTPVersion(spec, osVersion) got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
process.env.RUNNER_ARCH = previousRunnerArch
}) })
} }
if (process.platform === 'darwin') { if (process.platform === 'darwin') {
it('is main-... only if strict/maint-... is used as input', async () => {
const arm64Options = setupBeam.githubARMRunnerArchs()
const previousRunnerArch = process.env.RUNNER_ARCH
process.env.RUNNER_ARCH =
arm64Options[Math.floor(Math.random() * arm64Options.length)]
before = simulateInput('version-type', 'strict')
await assert.rejects(
async () => {
await setupBeam.getOTPVersion('27')
},
(err) => {
assert.ok(err instanceof Error)
return true
},
`Fetching strict OTP version maint-<v> with input <v> is supposed to fail`,
)
simulateInput('version-type', before)
before = simulateInput('version-type', 'strict')
assert.strictEqual(await setupBeam.getOTPVersion('maint-27'), 'maint-27')
simulateInput('version-type', before)
before = simulateInput('version-type', 'loose')
assert.strictEqual(await setupBeam.getOTPVersion('maint-27'), 'maint-27')
simulateInput('version-type', before)
process.env.RUNNER_ARCH = previousRunnerArch
})
it('is Ok for known macos ARM64 version', async () => { it('is Ok for known macos ARM64 version', async () => {
const arm64Options = setupBeam.githubARMRunnerArchs() const arm64Options = setupBeam.githubARMRunnerArchs()
const previousRunnerArch = process.env.RUNNER_ARCH
process.env.RUNNER_ARCH = process.env.RUNNER_ARCH =
arm64Options[Math.floor(Math.random() * arm64Options.length)] arm64Options[Math.floor(Math.random() * arm64Options.length)]
@@ -485,10 +537,13 @@ describe('.getOTPVersion(_) - Erlang', () => {
got = await setupBeam.getOTPVersion(spec, osVersion) got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
simulateInput('version-type', before) simulateInput('version-type', before)
process.env.RUNNER_ARCH = previousRunnerArch
}) })
it('is Ok for known macos AMD64 version', async () => { it('is Ok for known macos AMD64 version', async () => {
const amd64Options = setupBeam.githubARMRunnerArchs() const amd64Options = setupBeam.githubARMRunnerArchs()
const previousRunnerArch = process.env.RUNNER_ARCH
process.env.RUNNER_ARCH = process.env.RUNNER_ARCH =
amd64Options[Math.floor(Math.random() * amd64Options.length)] amd64Options[Math.floor(Math.random() * amd64Options.length)]
@@ -499,11 +554,12 @@ describe('.getOTPVersion(_) - Erlang', () => {
got = await setupBeam.getOTPVersion(spec, osVersion) got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
simulateInput('version-type', before) simulateInput('version-type', before)
process.env.RUNNER_ARCH = previousRunnerArch
}) })
} }
simulateInput('hexpm-mirrors', hexMirrors, { multiline: true }) simulateInput('hexpm-mirrors', hexMirrors, { multiline: true })
process.env.RUNNER_ARCH = previousRunnerArch
}) })
describe('OTP arch-specific install', () => { describe('OTP arch-specific install', () => {
@@ -515,7 +571,7 @@ describe('OTP arch-specific install', () => {
const spec = '26' const spec = '26'
const osVersion = 'ubuntu-24.04' const osVersion = 'ubuntu-24.04'
assert.rejects( await assert.rejects(
async () => { async () => {
await setupBeam.getOTPVersion(spec, osVersion) await setupBeam.getOTPVersion(spec, osVersion)
}, },
@@ -526,6 +582,7 @@ describe('OTP arch-specific install', () => {
`Fetching OTP Version with invalid Github runner architecture is supposed to fail`, `Fetching OTP Version with invalid Github runner architecture is supposed to fail`,
) )
} }
process.env.RUNNER_ARCH = previousRunnerArch process.env.RUNNER_ARCH = previousRunnerArch
}) })
}) })
@@ -536,77 +593,65 @@ describe('.getOTPVersion(_) - Elixir', () => {
let spec let spec
let otpVersion let otpVersion
let before let before
const hexMirrors = simulateInput('hexpm-mirrors', 'https://repo.hex.pm', {
multiline: true,
})
it('returns the expected value', async () => { if (process.platform === 'linux') {
spec = '1.1.x' it('returns the expected value', async () => {
otpVersion = 'OTP-17' spec = '1.18.x'
expected = 'v1.1.1-otp-17' otpVersion = 'OTP-27'
got = await setupBeam.getElixirVersion(spec, otpVersion) expected = 'v1.18.4-otp-27'
assert.deepStrictEqual(got, expected) await setupBeam.installOTP(otpVersion)
got = await setupBeam.getElixirVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
spec = '1.10.4' spec = '1.18.2'
otpVersion = 'OTP-23' otpVersion = 'OTP-27'
expected = 'v1.10.4-otp-23' expected = 'v1.18.2-otp-27'
got = await setupBeam.getElixirVersion(spec, otpVersion) await setupBeam.installOTP(otpVersion)
assert.deepStrictEqual(got, expected) got = await setupBeam.getElixirVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
spec = '1.16.2-otp-26' spec = '1.16.2-otp-26'
otpVersion = 'OTP-27' otpVersion = 'OTP-27'
expected = 'v1.16.2-otp-26' expected = 'v1.16.2-otp-26'
got = await setupBeam.getElixirVersion(spec, otpVersion) await setupBeam.installOTP(otpVersion)
assert.deepStrictEqual(got, expected) got = await setupBeam.getElixirVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
spec = '1.12.1' spec = '1.12.1'
otpVersion = 'OTP-24.0.2' otpVersion = 'OTP-24.3.4'
expected = 'v1.12.1-otp-24' expected = 'v1.12.1-otp-24'
got = await setupBeam.getElixirVersion(spec, otpVersion) await setupBeam.installOTP(otpVersion)
assert.deepStrictEqual(got, expected) got = await setupBeam.getElixirVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
before = simulateInput('version-type', 'strict') before = simulateInput('version-type', 'strict')
spec = '1.14.0' spec = '1.17'
otpVersion = 'main' otpVersion = 'master'
expected = 'v1.14.0' expected = 'v1.17-otp-27'
got = await setupBeam.getElixirVersion(spec, otpVersion) await setupBeam.installOTP(otpVersion)
assert.deepStrictEqual(got, expected) got = await setupBeam.getElixirVersion(spec, otpVersion)
simulateInput('version-type', before) assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)
before = simulateInput('version-type', 'strict') before = simulateInput('version-type', 'strict')
spec = 'v1.11.0-rc.0' spec = 'v1.15.0-rc.2'
otpVersion = 'OTP-23' otpVersion = 'OTP-26.0'
expected = 'v1.11.0-rc.0-otp-23' expected = 'v1.15.0-rc.2-otp-26'
got = await setupBeam.getElixirVersion(spec, otpVersion) await setupBeam.installOTP(otpVersion)
assert.deepStrictEqual(got, expected) got = await setupBeam.getElixirVersion(spec, otpVersion)
simulateInput('version-type', before) assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)
before = simulateInput('version-type', 'strict') before = simulateInput('version-type', 'strict')
spec = 'v1.11.0-rc.0-otp-23' spec = 'main'
otpVersion = 'OTP-23' otpVersion = '25.2'
expected = 'v1.11.0-rc.0-otp-23' expected = 'main-otp-25'
got = await setupBeam.getElixirVersion(spec, otpVersion) await setupBeam.installOTP(otpVersion)
assert.deepStrictEqual(got, expected) got = await setupBeam.getElixirVersion(spec, otpVersion)
simulateInput('version-type', before) assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)
before = simulateInput('version-type', 'strict') })
spec = 'v1.11.0' }
otpVersion = '22.3.4.2'
expected = 'v1.11.0-otp-22'
got = await setupBeam.getElixirVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)
before = simulateInput('version-type', 'strict')
spec = 'main'
otpVersion = '23.1'
expected = 'main-otp-23'
got = await setupBeam.getElixirVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)
})
simulateInput('hexpm-mirrors', hexMirrors, { multiline: true })
}) })
describe('.getOTPVersion(_) - Gleam', () => { describe('.getOTPVersion(_) - Gleam', () => {
@@ -622,6 +667,12 @@ describe('.getOTPVersion(_) - Gleam', () => {
got = await setupBeam.getGleamVersion(spec, otpVersion) got = await setupBeam.getGleamVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
spec = 'nightly'
otpVersion = '28'
expected = 'nightly'
got = await setupBeam.getGleamVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
spec = '0.13.2' spec = '0.13.2'
otpVersion = 'OTP-24' otpVersion = 'OTP-24'
expected = 'v0.13.2' expected = 'v0.13.2'
@@ -875,11 +926,21 @@ describe('.getVersionFromSpec(_)', () => {
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-20.04']) got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-20.04'])
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
spec = '> 0'
expected = 'OTP-26.2.5'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-22.04'])
assert.deepStrictEqual(got, expected)
spec = 'latest' spec = 'latest'
expected = 'OTP-27.0-rc3' expected = 'OTP-27.0-rc3'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-22.04']) got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-22.04'])
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
spec = '> 0'
expected = 'OTP-27.0'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-24.04'])
assert.deepStrictEqual(got, expected)
spec = 'latest' spec = 'latest'
expected = 'OTP-27.0' expected = 'OTP-27.0'
got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-24.04']) got = setupBeam.getVersionFromSpec(spec, matrix.otp['ubuntu-24.04'])
@@ -917,23 +978,25 @@ describe('.getVersionFromSpec(_)', () => {
}) })
}) })
describe('version file', () => { describe('.tool-versions file', () => {
const otpVersion = unsimulateInput('otp-version') const otpVersion = unsimulateInput('otp-version')
const elixirVersion = unsimulateInput('elixir-version') const elixirVersion = unsimulateInput('elixir-version')
const gleamVersion = unsimulateInput('gleam-version') const gleamVersion = unsimulateInput('gleam-version')
const rebar3Version = unsimulateInput('rebar3-version')
it('is parsed correctly', async () => { it('is parsed correctly', async () => {
const erlang = '27' const erlang = '27.3.4.1'
const elixir = '1.17.0' const elixir = '1.18.4'
const gleam = '0.23.0' const gleam = '1.9.1'
const rebar3 = '3.24.0' let toolVersions = `# a comment
const toolVersions = `# a comment erlang ref:v${erlang}
erlang ref:v${erlang}# comment, no space, and ref:v
elixir ref:${elixir} # comment, with space and ref: elixir ref:${elixir} # comment, with space and ref:
not-gleam 0.23 # not picked up not-gleam 0.23 # not picked up
gleam ${gleam} \nrebar ${rebar3}` gleam ${gleam} \n`
const filename = 'test/.tool-versions' const filename = 'test/.tool-versions'
if (process.platform === 'win32') {
// Force \r\n to test in Windows
toolVersions = toolVersions.replace(/\n/g, '\r\n')
}
fs.writeFileSync(filename, toolVersions) fs.writeFileSync(filename, toolVersions)
process.env.GITHUB_WORKSPACE = '' process.env.GITHUB_WORKSPACE = ''
const appVersions = setupBeam.parseVersionFile(filename) const appVersions = setupBeam.parseVersionFile(filename)
@@ -957,15 +1020,62 @@ gleam ${gleam} \nrebar ${rebar3}`
assert.ok(async () => { assert.ok(async () => {
await setupBeam.install('gleam', { toolVersion: gleam }) await setupBeam.install('gleam', { toolVersion: gleam })
}) })
})
simulateInput('otp-version', otpVersion)
simulateInput('elixir-version', elixirVersion)
simulateInput('gleam-version', gleamVersion)
})
describe('mise.toml file', () => {
const otpVersion = unsimulateInput('otp-version')
const elixirVersion = unsimulateInput('elixir-version')
const gleamVersion = unsimulateInput('gleam-version')
it('is parsed correctly', async () => {
const erlang = '27.3.4.1'
const elixir = '1.18.4'
const gleam = '1.9.1'
let miseToml = `[tools]
"erlang" = "${erlang}"
elixir = { version = "${elixir}", postinstall="mix deps.get" } # comment, with space and ref:
"not-gleam" = 0.23 # not picked up
"gleam" = "${gleam}"
[env]
_.file = ".env"\n`
const filename = 'test/mise.toml'
if (process.platform === 'win32') {
// Force \r\n to test in Windows
miseToml = miseToml.replace(/\n/g, '\r\n')
}
fs.writeFileSync(filename, miseToml)
process.env.GITHUB_WORKSPACE = ''
const appVersions = setupBeam.parseVersionFile(filename)
assert.strictEqual(appVersions.get('erlang'), erlang)
assert.strictEqual(appVersions.get('elixir'), elixir)
const absoluteFilename = path.join(os.tmpdir(), 'mise.toml')
fs.writeFileSync(absoluteFilename, miseToml)
process.env.GITHUB_WORKSPACE = process.cwd()
const absoluteAppVersions = setupBeam.parseVersionFile(absoluteFilename)
assert.strictEqual(absoluteAppVersions.get('erlang'), erlang)
assert.strictEqual(absoluteAppVersions.get('elixir'), elixir)
assert.ok(async () => { assert.ok(async () => {
await setupBeam.install('rebar3', { toolVersion: rebar3 }) await setupBeam.install('otp', { toolVersion: erlang })
})
assert.ok(async () => {
await setupBeam.install('elixir', { toolVersion: elixir })
})
assert.ok(async () => {
await setupBeam.install('gleam', { toolVersion: gleam })
}) })
}) })
simulateInput('otp-version', otpVersion) simulateInput('otp-version', otpVersion)
simulateInput('elixir-version', elixirVersion) simulateInput('elixir-version', elixirVersion)
simulateInput('gleam-version', gleamVersion) simulateInput('gleam-version', gleamVersion)
simulateInput('rebar3-version', rebar3Version)
}) })
describe('.get(_)', () => { describe('.get(_)', () => {
@@ -1059,6 +1169,98 @@ describe("Elixir Mix matcher's", () => {
}) })
}) })
describe("Erlang matcher's", () => {
it('erlc errors are properly matched', () => {
const [matcher] = erlangProblemMatcher.find(
({ owner }) => owner === 'erlc-error',
).pattern
const output = 'src/mymod.erl:42:5: head mismatch'
const match = output.match(matcher.regexp)
assert.equal(match[1], 'src/mymod.erl')
assert.equal(match[2], '42')
assert.equal(match[3], '5')
assert.equal(match[4], 'head mismatch')
})
it('erlc errors do not match warnings', () => {
const [matcher] = erlangProblemMatcher.find(
({ owner }) => owner === 'erlc-error',
).pattern
const output = 'src/mymod.erl:42:5: Warning: variable X is unused'
const match = output.match(matcher.regexp)
assert.equal(match, null)
})
it('erlc warnings are properly matched', () => {
const [matcher] = erlangProblemMatcher.find(
({ owner }) => owner === 'erlc-warning',
).pattern
const output = 'src/mymod.erl:10:3: Warning: variable X is unused'
const match = output.match(matcher.regexp)
assert.equal(match[1], 'src/mymod.erl')
assert.equal(match[2], '10')
assert.equal(match[3], '3')
assert.equal(match[4], 'variable X is unused')
})
it('dialyzer warnings are matched via erlc patterns', () => {
const [matcher] = erlangProblemMatcher.find(
({ owner }) => owner === 'erlc-warning',
).pattern
const output =
'src/mymod.erl:25:1: warning: Function foo/0 has no local return'
const match = output.match(matcher.regexp)
assert.equal(match[1], 'src/mymod.erl')
assert.equal(match[2], '25')
assert.equal(match[3], '1')
assert.equal(match[4], 'Function foo/0 has no local return')
})
it('CT failures are properly matched', () => {
const [filePattern, reasonPattern] = erlangProblemMatcher.find(
({ owner }) => owner === 'ct-failure',
).pattern
const firstOutput = 'test/mymod_SUITE.erl failed on line 55'
const secondOutput = 'Reason: {badmatch,{error,timeout}}'
const fileMatch = firstOutput.match(filePattern.regexp)
assert.equal(fileMatch[1], 'test/mymod_SUITE.erl')
assert.equal(fileMatch[2], '55')
const reasonMatch = secondOutput.match(reasonPattern.regexp)
assert.equal(reasonMatch[1], '{badmatch,{error,timeout}}')
})
it('EUnit failures are properly matched', () => {
const [headerPattern, funcPattern, callPattern, errorPattern] =
erlangProblemMatcher.find(
({ owner }) => owner === 'eunit-failure',
).pattern
const header = 'mymod_test: hello_test....*failed*'
const func =
'in function mymod_test:hello_test/0 (test/mymod_test.erl, line 12)'
const call = 'in call from mymod_test:hello_test/0'
const error = '**error:{badmatch,false}'
assert.ok(header.match(headerPattern.regexp))
const funcMatch = func.match(funcPattern.regexp)
assert.equal(funcMatch[1], 'test/mymod_test.erl')
assert.equal(funcMatch[2], '12')
assert.ok(call.match(callPattern.regexp))
const errorMatch = error.match(errorPattern.regexp)
assert.equal(errorMatch[1], '{badmatch,false}')
})
})
function unsimulateInput(key) { function unsimulateInput(key) {
return simulateInput(key, '') return simulateInput(key, '')
} }