Skip to content

Commit

Permalink
Fix CI (don't use 26.2.5 on Windows; be strict when comparing version…
Browse files Browse the repository at this point in the history
…s) (#299)
  • Loading branch information
paulo-ferraz-oliveira authored Jul 17, 2024
1 parent d2ccea2 commit ee8d6d1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
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
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

0 comments on commit ee8d6d1

Please sign in to comment.