Compare commits

...
3 Commits
Author SHA1 Message Date
Paulo F. OliveiraandGitHub b50aa18219 v1.7.1 (#35) 2021-05-15 00:29:16 +01:00
Paulo F. OliveiraandGitHub a550a4c889 Coerce non-semver into semver (#34) 2021-05-15 00:07:41 +01:00
Paulo F. OliveiraandGitHub d2707f347b Tweak our test combos (#31) 2021-04-19 23:17:55 +01:00
11 changed files with 669 additions and 464 deletions
+83 -64
View File
@@ -21,99 +21,118 @@ jobs:
integration_test: integration_test:
name: > name: >
Pre-release integration tests Pre-release integration tests
(Erlang/OTP ${{matrix.pair.otp-version}}, (Ubuntu ${{matrix.combo.os}},
Elixir ${{matrix.pair.elixir-version}}, Erlang/OTP ${{matrix.combo.otp-version}},
rebar3 ${{matrix.pair.rebar3-version}}) Elixir ${{matrix.combo.elixir-version}},
runs-on: ubuntu-18.04 rebar3 ${{matrix.combo.rebar3-version}})
runs-on: ${{matrix.combo.os}}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
pair: combo:
# Full Versions - elixir-version: 'v1.0'
- otp-version: '22.0' otp-version: '17'
elixir-version: '1.9.1' os: 'ubuntu-16.04'
- otp-version: '22.3.4' - elixir-version: 'v1.0'
rebar3-version: '3.14.4' otp-version: '17'
# Semver ranges os: 'ubuntu-18.04'
- otp-version: '21.x' - elixir-version: 'v1.1'
elixir-version: '<1.9.1' otp-version: '18'
- otp-version: '21.x' os: 'ubuntu-16.04'
rebar3-version: '3.14.4' - elixir-version: 'v1.1'
# Branches otp-version: '18'
- otp-version: '22.0' os: 'ubuntu-18.04'
elixir-version: master - elixir-version: 'v1.2'
- otp-version: 'master' otp-version: '19'
elixir-version: '1.11.3' rebar3-version: '3.10'
# Pre-releases os: 'ubuntu-16.04'
- otp-version: '23.0' - elixir-version: 'v1.2'
elixir-version: '1.11.0-rc.0' otp-version: '19'
# Fallback to Elixir (with no OTP) rebar3-version: '3.10'
- otp-version: '24.0-rc1' os: 'ubuntu-18.04'
elixir-version: '1.9.3' - elixir-version: 'v1.4'
# Miscellaneous combos otp-version: '20'
- elixir-version: 'master' rebar3-version: '3.11'
otp-version: '22.3' os: 'ubuntu-16.04'
- elixir-version: 'master' - elixir-version: 'v1.4'
otp-version: '22' otp-version: '20'
- elixir-version: 'master' rebar3-version: '3.11'
otp-version: '^22' os: 'ubuntu-18.04'
- elixir-version: 'master' - elixir-version: 'v1.4'
otp-version: '22' otp-version: '20'
- elixir-version: '1.6.5' rebar3-version: '3.11'
otp-version: 'maint-21' os: 'ubuntu-20.04'
- elixir-version: 'v1.6.5' - elixir-version: 'v1.6'
otp-version: 'maint-21'
- elixir-version: 'v1.9.x'
otp-version: '21.1'
- elixir-version: '1.9.x'
otp-version: '21' otp-version: '21'
- elixir-version: 'v1.8.x' rebar3-version: '3.12'
os: 'ubuntu-16.04'
- elixir-version: 'v1.6'
otp-version: '21'
rebar3-version: '3.12'
os: 'ubuntu-18.04'
- elixir-version: 'v1.6'
otp-version: '21'
rebar3-version: '3.12'
os: 'ubuntu-20.04'
- elixir-version: 'v1.7'
otp-version: '22' otp-version: '22'
- elixir-version: 'v1.8.x' rebar3-version: '3.13'
otp-version: '23.1' os: 'ubuntu-16.04'
- elixir-version: 'v1.8' - elixir-version: 'v1.7'
otp-version: '^22.3' otp-version: '22'
rebar3-version: '3.13'
os: 'ubuntu-18.04'
- elixir-version: 'v1.7'
otp-version: '22'
rebar3-version: '3.13'
os: 'ubuntu-20.04'
- elixir-version: 'v1.10' - elixir-version: 'v1.10'
otp-version: '21.x'
- elixir-version: 'v1.x'
otp-version: 'master'
- elixir-version: 'v1.11.0-rc.0'
otp-version: '23' otp-version: '23'
- elixir-version: 'v1.11.0-rc.0' rebar3-version: '3.14'
otp-version: '23.0' os: 'ubuntu-16.04'
- elixir-version: 'v1.11.0-rc.0' - elixir-version: 'v1.10'
otp-version: 'master' otp-version: '23'
rebar3-version: '3.14'
os: 'ubuntu-18.04'
- elixir-version: 'v1.10'
otp-version: '23'
rebar3-version: '3.14'
os: 'ubuntu-20.04'
- elixir-version: 'v1.12'
otp-version: '24'
rebar3-version: '3.15'
os: 'ubuntu-20.04'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Use erlef/setup-beam - name: Use erlef/setup-beam
id: setup-beam id: setup-beam
uses: ./ uses: ./
with: with:
otp-version: ${{matrix.pair.otp-version}} otp-version: ${{matrix.combo.otp-version}}
elixir-version: ${{matrix.pair.elixir-version}} elixir-version: ${{matrix.combo.elixir-version}}
rebar3-version: ${{matrix.pair.rebar3-version}} rebar3-version: ${{matrix.combo.rebar3-version}}
- name: Erlang/OTP version (action) - name: Erlang/OTP version (action)
run: echo "Erlang/OTP ${{steps.setup-beam.outputs.otp-version}}" run: echo "Erlang/OTP ${{steps.setup-beam.outputs.otp-version}}"
- name: Elixir version (action) - name: Elixir version (action)
run: echo "Elixir ${{steps.setup-beam.outputs.elixir-version}}" run: echo "Elixir ${{steps.setup-beam.outputs.elixir-version}}"
if: ${{matrix.pair.elixir-version}} if: ${{matrix.combo.elixir-version}}
- name: rebar3 version (action) - name: rebar3 version (action)
run: echo "rebar3 ${{steps.setup-beam.outputs.rebar3-version}}" run: echo "rebar3 ${{steps.setup-beam.outputs.rebar3-version}}"
if: ${{matrix.pair.rebar3-version}} if: ${{matrix.combo.rebar3-version}}
- name: mix version and help (CLI) - name: mix version and help (CLI)
run: | run: |
mix -v mix -v
mix help local.rebar mix help local.rebar
mix help local.hex mix help local.hex
if: ${{matrix.pair.elixir-version}} if: ${{matrix.combo.elixir-version}}
- name: Run Mix project tests - name: Run Mix project tests
run: | run: |
cd test-projects/mix cd test-projects/mix
mix deps.get mix deps.get
mix test mix test
if: ${{matrix.pair.elixir-version}} if: ${{matrix.combo.elixir-version}}
- name: Run rebar3 project tests - name: Run rebar3 project tests
run: | run: |
cd test-projects/rebar3 cd test-projects/rebar3
rebar3 as test do xref,dialyzer,ct,cover rebar3 ct
if: ${{matrix.pair.rebar3-version}} if: ${{matrix.combo.rebar3-version}}
+3 -3
View File
@@ -1081,7 +1081,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----- -----
The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, object.entries. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/ljharb/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/ljharb/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/es-shims/Object.entries.git (object.entries). This software contains the following license and notice below: The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol, object.entries. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/inspect-js/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/inspect-js/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/es-shims/Object.entries.git (object.entries). This software contains the following license and notice below:
The MIT License (MIT) The MIT License (MIT)
@@ -1928,7 +1928,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
----- -----
The following software may be included in this product: is-bigint. A copy of the source code may be downloaded from git+https://github.com/ljharb/is-bigint.git. This software contains the following license and notice below: The following software may be included in this product: is-bigint. A copy of the source code may be downloaded from git+https://github.com/inspect-js/is-bigint.git. This software contains the following license and notice below:
MIT License MIT License
@@ -2216,7 +2216,7 @@ terms above.
----- -----
The following software may be included in this product: lodash.clonedeep, lodash.flatten, lodash.snakecase, lodash.truncate. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git (lodash.clonedeep), https://github.com/lodash/lodash.git (lodash.flatten), https://github.com/lodash/lodash.git (lodash.snakecase), https://github.com/lodash/lodash.git (lodash.truncate). This software contains the following license and notice below: The following software may be included in this product: lodash.clonedeep, lodash.snakecase, lodash.truncate. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git (lodash.clonedeep), https://github.com/lodash/lodash.git (lodash.snakecase), https://github.com/lodash/lodash.git (lodash.truncate). This software contains the following license and notice below:
Copyright jQuery Foundation and other contributors <https://jquery.org/> Copyright jQuery Foundation and other contributors <https://jquery.org/>
+2 -2
View File
@@ -37,12 +37,12 @@ not match a pre-release.
### Compatibility between Ubuntu and Erlang/OTP ### Compatibility between Ubuntu and Erlang/OTP
This list presents the known working version combos between Ubuntu This list presents the known working version combos between Ubuntu
and Erlang/OTP. Non-listed combos are not guaranteed to work. and Erlang/OTP.
| Ubuntu | Erlang/OTP | Status | Ubuntu | Erlang/OTP | Status
|- |- |- |- |- |-
| ubuntu-16.04 | 17 - 23 | ✅ | ubuntu-16.04 | 17 - 23 | ✅
| ubuntu-18.04 | 20 - 23 | ✅ | ubuntu-18.04 | 17 - 23 | ✅
| ubuntu-20.04 | 20 - 23 | ✅ | ubuntu-20.04 | 20 - 23 | ✅
### Basic example (Elixir) ### Basic example (Elixir)
+24
View File
@@ -98,6 +98,30 @@ async function testOTPVersions() {
expected = 'OTP-19.3.6' expected = 'OTP-19.3.6'
got = await setupElixir.getOTPVersion(spec, osVersion) got = await setupElixir.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected) assert.deepStrictEqual(got, expected)
spec = '20'
osVersion = 'ubuntu-20.04'
expected = 'OTP-20.3.8'
got = await setupElixir.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)
spec = '20.x'
osVersion = 'ubuntu-20.04'
expected = 'OTP-20.3.8'
got = await setupElixir.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)
spec = '20.0'
osVersion = 'ubuntu-20.04'
expected = 'OTP-20.0.5'
got = await setupElixir.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)
spec = '20.0.x'
osVersion = 'ubuntu-20.04'
expected = 'OTP-20.0.5'
got = await setupElixir.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)
} }
async function testElixirVersions() { async function testElixirVersions() {
+54 -22
View File
@@ -1067,11 +1067,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next()); step((generator = generator.apply(thisArg, _arguments || [])).next());
}); });
}; };
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
var _a; var _a;
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
const assert_1 = __nccwpck_require__(2357); const assert_1 = __nccwpck_require__(2357);
const fs = __nccwpck_require__(5747); const fs = __importStar(__nccwpck_require__(5747));
const path = __nccwpck_require__(5622); const path = __importStar(__nccwpck_require__(5622));
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
exports.IS_WINDOWS = process.platform === 'win32'; exports.IS_WINDOWS = process.platform === 'win32';
function exists(fsPath) { function exists(fsPath) {
@@ -1269,11 +1276,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next()); step((generator = generator.apply(thisArg, _arguments || [])).next());
}); });
}; };
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
const childProcess = __nccwpck_require__(3129); const childProcess = __importStar(__nccwpck_require__(3129));
const path = __nccwpck_require__(5622); const path = __importStar(__nccwpck_require__(5622));
const util_1 = __nccwpck_require__(1669); const util_1 = __nccwpck_require__(1669);
const ioUtil = __nccwpck_require__(1962); const ioUtil = __importStar(__nccwpck_require__(1962));
const exec = util_1.promisify(childProcess.exec); const exec = util_1.promisify(childProcess.exec);
/** /**
* Copies a file or folder. * Copies a file or folder.
@@ -1441,12 +1455,30 @@ function which(tool, check) {
throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`);
} }
} }
return result;
}
const matches = yield findInPath(tool);
if (matches && matches.length > 0) {
return matches[0];
}
return '';
});
}
exports.which = which;
/**
* Returns a list of all occurrences of the given tool on the system path.
*
* @returns Promise<string[]> the paths of the tool
*/
function findInPath(tool) {
return __awaiter(this, void 0, void 0, function* () {
if (!tool) {
throw new Error("parameter 'tool' is required");
} }
try {
// build the list of extensions to try // build the list of extensions to try
const extensions = []; const extensions = [];
if (ioUtil.IS_WINDOWS && process.env.PATHEXT) { if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {
for (const extension of process.env.PATHEXT.split(path.delimiter)) { for (const extension of process.env['PATHEXT'].split(path.delimiter)) {
if (extension) { if (extension) {
extensions.push(extension); extensions.push(extension);
} }
@@ -1456,13 +1488,13 @@ function which(tool, check) {
if (ioUtil.isRooted(tool)) { if (ioUtil.isRooted(tool)) {
const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);
if (filePath) { if (filePath) {
return filePath; return [filePath];
} }
return ''; return [];
} }
// if any path separators, return empty // if any path separators, return empty
if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\'))) { if (tool.includes(path.sep)) {
return ''; return [];
} }
// build the list of directories // build the list of directories
// //
@@ -1478,21 +1510,18 @@ function which(tool, check) {
} }
} }
} }
// return the first match // find all matches
const matches = [];
for (const directory of directories) { for (const directory of directories) {
const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions); const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);
if (filePath) { if (filePath) {
return filePath; matches.push(filePath);
} }
} }
return ''; return matches;
}
catch (err) {
throw new Error(`which failed with message ${err.message}`);
}
}); });
} }
exports.which = which; exports.findInPath = findInPath;
function readCopyOptions(options) { function readCopyOptions(options) {
const force = options.force == null ? true : options.force; const force = options.force == null ? true : options.force;
const recursive = Boolean(options.recursive); const recursive = Boolean(options.recursive);
@@ -4791,7 +4820,10 @@ async function getOTPVersions(osVersion) {
.forEach((line) => { .forEach((line) => {
const otpMatch = line.match(/^(OTP-)?([^ ]+)/) const otpMatch = line.match(/^(OTP-)?([^ ]+)/)
const otpVersion = otpMatch[2] let otpVersion = otpMatch[2]
if (semver.validRange(otpVersion)) {
otpVersion = semver.minVersion(otpVersion).version
}
otpVersions.set(otpVersion, otpMatch[0]) // we keep the original for later reference otpVersions.set(otpVersion, otpMatch[0]) // we keep the original for later reference
}) })
+9
View File
@@ -15,6 +15,15 @@ MIT
@actions/io @actions/io
MIT MIT
The MIT License (MIT)
Copyright 2019 GitHub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
lru-cache lru-cache
ISC ISC
+450 -339
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "setup-beam", "name": "setup-beam",
"version": "1.7.0", "version": "1.7.1",
"license": "MIT", "license": "MIT",
"private": true, "private": true,
"scripts": { "scripts": {
+4 -1
View File
@@ -184,7 +184,10 @@ async function getOTPVersions(osVersion) {
.forEach((line) => { .forEach((line) => {
const otpMatch = line.match(/^(OTP-)?([^ ]+)/) const otpMatch = line.match(/^(OTP-)?([^ ]+)/)
const otpVersion = otpMatch[2] let otpVersion = otpMatch[2]
if (semver.validRange(otpVersion)) {
otpVersion = semver.minVersion(otpVersion).version
}
otpVersions.set(otpVersion, otpMatch[0]) // we keep the original for later reference otpVersions.set(otpVersion, otpMatch[0]) // we keep the original for later reference
}) })
+4
View File
@@ -6,4 +6,8 @@ defmodule TestTest do
out = Logfmt.encode(foo: "bar") out = Logfmt.encode(foo: "bar")
assert out == "foo=bar" assert out == "foo=bar"
end end
test "ensures ssl" do
assert {:ok, _} = Application.ensure_all_started(:ssl)
end
end end
+4 -1
View File
@@ -5,7 +5,10 @@
-compile([export_all, nowarn_export_all]). -compile([export_all, nowarn_export_all]).
all() -> all() ->
[hello_world]. [hello_world, ssl_ok].
hello_world(_Config) -> hello_world(_Config) ->
?assertEqual(world, mylib:hello()). ?assertEqual(world, mylib:hello()).
ssl_ok(_Config) ->
{ok, _} = application:ensure_all_started(ssl).