Skip to content

Commit

Permalink
Enable macos and windows runners for examples.yml and tests.yml (#604)
Browse files Browse the repository at this point in the history
* Enable macos and windows runners for examples.yml and tests.yml

Signed-off-by: Radoslav Dimitrov <[email protected]>

* Simplify fetcher HTTP status code check

Signed-off-by: Radoslav Dimitrov <[email protected]>

---------

Signed-off-by: Radoslav Dimitrov <[email protected]>
  • Loading branch information
rdimitrov authored Feb 7, 2024
1 parent 85bd220 commit f5cf712
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
Expand All @@ -47,7 +47,7 @@ jobs:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
Expand All @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
Expand All @@ -79,7 +79,7 @@ jobs:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
Expand All @@ -95,7 +95,7 @@ jobs:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest] # , macos-latest, windows-latest] Enable later so we don't waste github actions resources
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
os: [ubuntu-latest, windows-latest] # , ] Enable later so we don't waste github actions resources
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ${{ fromJSON(needs.get-go-versions.outputs.matrix) }}
runs-on: ${{ matrix.os }}
needs: get-go-versions
Expand Down
2 changes: 1 addition & 1 deletion metadata/fetcher/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (d *DefaultFetcher) DownloadFile(urlPath string, maxLength int64, timeout t
}
defer res.Body.Close()
// Handle HTTP status codes.
if res.StatusCode == http.StatusNotFound || res.StatusCode == http.StatusForbidden || res.StatusCode != http.StatusOK {
if res.StatusCode != http.StatusOK {
return nil, &metadata.ErrDownloadHTTP{StatusCode: res.StatusCode, URL: urlPath}
}
var length int64
Expand Down

0 comments on commit f5cf712

Please sign in to comment.