Skip to content

Commit 9f3cb5a

Browse files
committed
Reverse the order of versions
It appears more natural to have the versions in the matrix in ascending order.
1 parent a77b85c commit 9f3cb5a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
- run: |
4040
test '${{ steps.go-version.outputs.latest }}' == '1.18'
4141
- run: |
42-
test '${{ steps.go-version.outputs.matrix }}' == '["1.18","1.17","1.16","1.15","1.14","1.13"]'
42+
test '${{ steps.go-version.outputs.matrix }}' == '["1.13","1.14","1.15","1.16","1.17","1.18"]'

__tests__/main.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ test('test minimal version', () => {
1212
})
1313

1414
test('test latest version', () => {
15-
expect(latest(['1.18', '1.17', '1.16', '1.15', '1.14', '1.13'])).toEqual(
15+
expect(latest(['1.13', '1.14', '1.15', '1.16', '1.17', '1.18'])).toEqual(
1616
'1.18'
1717
)
1818
})
1919

2020
test('test version matrix', () => {
2121
const t = JSON.parse(fs.readFileSync('__tests__/testdata/dl.json', 'utf8'))
2222
const m = matrix('1.13', t)
23-
expect(m).toEqual(['1.18', '1.17', '1.16', '1.15', '1.14', '1.13'])
23+
expect(m).toEqual(['1.13', '1.14', '1.15', '1.16', '1.17', '1.18'])
2424
})

src/go-versions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const matrix = (min: string, tags: Version[]): string[] => {
6666
return v2 !== null && semverGte(v2, minClean)
6767
})
6868

69-
return versions
69+
return versions.reverse()
7070
}
7171

7272
const latest = (versions: string[]): string => {

0 commit comments

Comments
 (0)