-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run CI (tests) on MacOS #3528
Run CI (tests) on MacOS #3528
Changes from all commits
a191835
c91970d
9579653
0fccc3b
70afbe5
fec9ed6
0131561
68abb7f
8047e70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
go-version: [1.20.x] | ||
platform: [ubuntu-latest, windows-2019] | ||
platform: [ubuntu-latest, windows-2019, macos-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Checkout code | ||
|
@@ -37,8 +37,8 @@ jobs: | |
go version | ||
export GOMAXPROCS=2 | ||
args=("-p" "2" "-race") | ||
# Run with less concurrency on Windows to minimize flakiness. | ||
if [[ "${{ matrix.platform }}" == windows* ]]; then | ||
# Run with less concurrency on Windows/MacOS to minimize flakiness. | ||
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* ]]; then | ||
unset args[2] | ||
args[1]="1" | ||
export GOMAXPROCS=1 | ||
|
@@ -49,7 +49,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest, windows-2019] | ||
platform: [ubuntu-latest, windows-2019, macos-latest] | ||
runs-on: ${{ matrix.platform }} | ||
continue-on-error: true | ||
steps: | ||
|
@@ -75,8 +75,8 @@ jobs: | |
go version | ||
export GOMAXPROCS=2 | ||
args=("-p" "2" "-race") | ||
# Run with less concurrency on Windows to minimize flakiness. | ||
if [[ "${{ matrix.platform }}" == windows* ]]; then | ||
# Run with less concurrency on Windows/MacOS to minimize flakiness. | ||
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* ]]; then | ||
unset args[2] | ||
args[1]="1" | ||
export GOMAXPROCS=1 | ||
|
@@ -88,7 +88,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
go-version: [1.21.x] | ||
platform: [ubuntu-latest, windows-2019] | ||
platform: [ubuntu-latest, windows-2019, macos-latest] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Checkout code | ||
|
@@ -103,8 +103,8 @@ jobs: | |
go version | ||
export GOMAXPROCS=2 | ||
args=("-p" "2" "-race") | ||
# Run with less concurrency on Windows to minimize flakiness. | ||
if [[ "${{ matrix.platform }}" == windows* ]]; then | ||
# Run with less concurrency on Windows/MacOS to minimize flakiness. | ||
if [[ "${{ matrix.platform }}" == windows* || "${{ matrix.platform }}" == macos* ]]; then | ||
unset args[2] | ||
args[1]="1" | ||
export GOMAXPROCS=1 | ||
|
@@ -126,8 +126,12 @@ jobs: | |
CODECOV_BASH_SHA512SUM: d075b412a362a9a2b7aedfec3b8b9a9a927b3b99e98c7c15a2b76ef09862aeb005e91d76a5fd71b511141496d0fd23d1b42095f722ebcd509d768fba030f159e | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
if [[ "${{ matrix.platform }}" == macos* ]]; then | ||
shopt -s expand_aliases | ||
alias sha512sum='shasum -a 512' | ||
fi | ||
curl -fsSLO "https://raw.githubusercontent.com/codecov/codecov-bash/${CODECOV_BASH_VERSION}/codecov" | ||
echo "$CODECOV_BASH_SHA512SUM codecov" | sha512sum -c - | ||
echo "$CODECOV_BASH_SHA512SUM codecov" | sha512sum -c - | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For some reason (I didn't fully get), without the extra space it doesn't work on MacOS, but with it, it works correctly in all platforms 🤷🏻 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember that we had issues with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, nice! Thanks for letting me know, I could consider working on that right after, but I'd prefer to keep it for a separate PR, if that sounds good to you as well 🙏🏻 |
||
platform="${{ matrix.platform }}" | ||
bash ./codecov -F "${platform%%-*}" | ||
- name: Generate coverage HTML report | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried luck without this, and there has been no way to get all tests passing. I guess next step will be to take a look at that flakiness and try to correct it, but for now I guess it's fine, as it has been for Windows so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that tests are flaky on all platforms, primarily GRPC-TLS related https://github.com/grafana/xk6-grpc/issues/39. Which ones do you constantly see?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, there's nothing new, as I think all (or most) of them are documented at #2144.
It's just that it seems that Windows and MacOS runners are way more likely to fail (it's probably a matter of their performance), so I decided to add MacOS into that exception we already had for Windows, to avoid adding more flakiness.