Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI (don't use 26.2.5 on Windows; be strict when comparing versions) #299

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- otp-version: '24.0.2'
rebar3-version: '3.16'
os: 'windows-2019'
- otp-version: '26.2.5'
- otp-version: '26.1'
rebar3-version: 'nightly'
os: 'windows-2019'
- otp-version: '23.0'
Expand Down
21 changes: 14 additions & 7 deletions test/setup-beam.test.js
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these pertain to properly testing over strict, otherwise (as is the case) Erlang/OTP releases 27.0.1 and our tests break because we're expecting 27 to resolve to 27.0.

Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,17 @@ async function testOTPVersions() {
expected = 'maint-26'
got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)

simulateInput('version-type', before)

before = simulateInput('version-type', 'strict')
spec = '27.0'
osVersion = 'ubuntu-24.04'
expected = 'OTP-27.0'
got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)

simulateInput('version-type', before)

before = simulateInput('version-type', 'strict')
spec = '25.3.2.1'
osVersion = 'ubuntu-20.04'
expected = 'OTP-25.3.2.1'
Expand Down Expand Up @@ -308,15 +310,17 @@ async function testLinuxARM64OTPVersions() {
expected = 'maint-26'
got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)

simulateInput('version-type', before)

before = simulateInput('version-type', 'strict')
spec = '27.0'
osVersion = 'ubuntu-24.04'
expected = 'OTP-27.0'
got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)

simulateInput('version-type', before)

before = simulateInput('version-type', 'strict')
spec = '25.3.2.1'
osVersion = 'ubuntu-20.04'
expected = 'OTP-25.3.2.1'
Expand Down Expand Up @@ -393,22 +397,24 @@ async function testLinuxAMD64OTPVersions() {
expected = 'maint-26'
got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)

simulateInput('version-type', before)

before = simulateInput('version-type', 'strict')
spec = '27.0'
osVersion = 'ubuntu-24.04'
expected = 'OTP-27.0'
got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)

simulateInput('version-type', before)

before = simulateInput('version-type', 'strict')
spec = '25.3.2.1'
osVersion = 'ubuntu-20.04'
expected = 'OTP-25.3.2.1'
got = await setupBeam.getOTPVersion(spec, osVersion)
assert.deepStrictEqual(got, expected)

simulateInput('version-type', before)

spec = '19.3.x'
osVersion = 'ubuntu-16.04'
expected = 'OTP-19.3.6.13'
Expand Down Expand Up @@ -562,6 +568,7 @@ async function testElixirVersions() {
got = await setupBeam.getElixirVersion(spec, otpVersion)
assert.deepStrictEqual(got, expected)
simulateInput('version-type', before)

simulateInput('hexpm-mirrors', hexMirrors, { multiline: true })
}

Expand Down