Skip to content

Commit f5cf712

Browse files
authored
Enable macos and windows runners for examples.yml and tests.yml (#604)
* Enable macos and windows runners for examples.yml and tests.yml Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com> * Simplify fetcher HTTP status code check Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com> --------- Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
1 parent 85bd220 commit f5cf712

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/examples.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: false # Keep running if one leg fails.
3333
matrix:
34-
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
34+
os: [ubuntu-latest, macos-latest, windows-latest]
3535
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
3636
runs-on: ${{ matrix.os }}
3737
needs: get-go-versions
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
fail-fast: false # Keep running if one leg fails.
4949
matrix:
50-
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
50+
os: [ubuntu-latest, macos-latest, windows-latest]
5151
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
5252
runs-on: ${{ matrix.os }}
5353
needs: get-go-versions
@@ -63,7 +63,7 @@ jobs:
6363
strategy:
6464
fail-fast: false # Keep running if one leg fails.
6565
matrix:
66-
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
66+
os: [ubuntu-latest, macos-latest, windows-latest]
6767
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
6868
runs-on: ${{ matrix.os }}
6969
needs: get-go-versions
@@ -79,7 +79,7 @@ jobs:
7979
strategy:
8080
fail-fast: false # Keep running if one leg fails.
8181
matrix:
82-
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
82+
os: [ubuntu-latest, macos-latest, windows-latest]
8383
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
8484
runs-on: ${{ matrix.os }}
8585
needs: get-go-versions
@@ -95,7 +95,7 @@ jobs:
9595
strategy:
9696
fail-fast: false # Keep running if one leg fails.
9797
matrix:
98-
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
98+
os: [ubuntu-latest, macos-latest, windows-latest]
9999
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
100100
runs-on: ${{ matrix.os }}
101101
needs: get-go-versions

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
fail-fast: false # Keep running if one leg fails.
3434
matrix:
35-
os: [ubuntu-latest, windows-latest] # , ] Enable later so we don't waste github actions resources
35+
os: [ubuntu-latest, macos-latest, windows-latest]
3636
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
3737
runs-on: ${{ matrix.os }}
3838
needs: get-go-versions

metadata/fetcher/fetcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64, timeout t
5656
}
5757
defer res.Body.Close()
5858
// Handle HTTP status codes.
59-
if res.StatusCode == http.StatusNotFound || res.StatusCode == http.StatusForbidden || res.StatusCode != http.StatusOK {
59+
if res.StatusCode != http.StatusOK {
6060
return nil, &metadata.ErrDownloadHTTP{StatusCode: res.StatusCode, URL: urlPath}
6161
}
6262
var length int64

0 commit comments

Comments
 (0)