Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Refactor the if for windows tip e2e to job level
Browse files Browse the repository at this point in the history
Instead of checking at each step, just check once at the job level and
skip the job run for Windows tip e2e.
  • Loading branch information
ankur22 committed Aug 17, 2023
1 parent e0bf96e commit 2066cd8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@ defaults:

jobs:
test:
if: matrix.go != 'tip' || matrix.platform != 'windows-latest'
strategy:
matrix:
go: [stable, tip]
platform: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
if: matrix.go != 'tip' || matrix.platform != 'windows-latest'
uses: actions/checkout@v2
- name: Install Go
if: matrix.go != 'tip' || matrix.platform != 'windows-latest'
uses: actions/setup-go@v2
with:
go-version: 1.x
- name: Install Go tip
if: matrix.go == 'tip' && matrix.platform != 'windows-latest'
if: matrix.go == 'tip'
run: |
go install golang.org/dl/gotip@latest
gotip download
Expand All @@ -40,10 +39,8 @@ jobs:
echo "$HOME/go/bin" >> "$GITHUB_PATH"
echo "$HOME/sdk/gotip/bin" >> "$GITHUB_PATH"
- name: Install xk6
if: matrix.go != 'tip' || matrix.platform != 'windows-latest'
run: go install go.k6.io/xk6/cmd/xk6@master
- name: Build extension
if: matrix.go != 'tip' || matrix.platform != 'windows-latest'
run: |
which go
go version
Expand All @@ -53,7 +50,6 @@ jobs:
--with github.com/grafana/xk6-browser=.
./k6extension version
- name: Run E2E tests
if: matrix.go != 'tip' || matrix.platform != 'windows-latest'
run: |
set -x
if [ "$RUNNER_OS" == "Linux" ]; then
Expand All @@ -68,6 +64,5 @@ jobs:
./k6extension run "$f"
done
- name: Check screenshot
if: matrix.go != 'tip' || matrix.platform != 'windows-latest'
# TODO: Do something more sophisticated?
run: test -s screenshot.png

0 comments on commit 2066cd8

Please sign in to comment.