Skip to content

Commit a4aa6a1

Browse files
committed
fix: tests
1 parent 2913b36 commit a4aa6a1

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ jobs:
99
include:
1010
- os: ubuntu-22.04
1111
- os: ubuntu-20.04
12+
- os: macos-13
1213
- os: macos-12
1314
- os: macos-11
1415
- os: windows-2022
1516
- os: windows-2019
1617
runs-on: ${{ matrix.os }}
1718
steps:
18-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
20+
- run: echo ${{ runner.os }}
21+
- run: echo ${{ runner.arch }}
22+
- run: uname -a
1923
- name: Set up Fastly CLI
2024
uses: ./setup
2125
with:

setup/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ async function setup() {
3030
}
3131

3232
async function downloadBin(bin) {
33-
let binVersion = core.getInput(`${bin}_version`);
33+
let interfaceName = bin == 'fastly' ? 'cli' : bin
34+
let binVersion = core.getInput(`${interfaceName}_version`);
3435

3536
// Normalize version string
3637
if (binVersion !== 'latest') {
3738
const valid = semver.valid(binVersion);
3839
if (!valid) {
39-
core.setFailed(`The provided ${bin}_version (${binVersion}) is not a valid SemVer string.`);
40+
core.setFailed(`The provided ${interfaceName}_version (${binVersion}) is not a valid SemVer string.`);
4041
return;
4142
}
4243

@@ -54,7 +55,7 @@ async function downloadBin(bin) {
5455
const octo = core.getInput('token') ? new Octokit({authStrategy: createActionAuth}) : new Octokit();
5556
const repo = {
5657
owner: 'fastly',
57-
repo: bin == 'fastly' ? 'cli' : bin,
58+
repo: interfaceName,
5859
tag: binVersion
5960
};
6061

@@ -83,7 +84,7 @@ async function downloadBin(bin) {
8384
let asset = release.data.assets.find((a) => a.name.endsWith(nameSuffix));
8485

8586
if (!asset) {
86-
core.setFailed(`Unable to find a suitable binary for release ${release.data.name}`);
87+
core.setFailed(`Unable to find a suitable binary that ends with ${nameSuffix} for release ${release.data.name}`);
8788
return;
8889
}
8990

0 commit comments

Comments
 (0)