Skip to content

Commit

Permalink
Windows tests remove setup stage, every job has its own cache (open-t…
Browse files Browse the repository at this point in the history
…elemetry#15676)

Revert previous experiment to configure a setup stage for windows since it takes way too much even when hitting the cache (more than 15mins).
This is a bit different than before, now every job has its own independent cache.

Signed-off-by: Bogdan Drutu <[email protected]>

Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu authored Oct 27, 2022
1 parent d81ef24 commit 0f737ff
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions .github/workflows/build-and-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,7 @@ concurrency:
cancel-in-progress: true

jobs:
setup-environment:
runs-on: windows-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Cache Go Mod
id: go-mod-cache
uses: actions/cache@v3
with:
path: |
~\go\pkg\mod
key: go-mod-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-mod-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
windows-unittest-matrix:
needs: [setup-environment]
strategy:
matrix:
group:
Expand Down Expand Up @@ -69,15 +48,13 @@ jobs:
with:
path: |
~\go\pkg\mod
key: go-mod-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Cache Go Build
uses: actions/cache@v3
with:
path: |
~\AppData\Local\go-build
key: go-build-cache-${{ runner.os }}-${{ matrix.group }}-go-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-mod-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload GROUP=${{ matrix.group }}
- name: Run Unit tests
run: make gotest GROUP=${{ matrix.group }}
run: make -j2 gotest GROUP=${{ matrix.group }}
windows-unittest:
if: ${{ always() }}
runs-on: windows-latest
Expand Down

0 comments on commit 0f737ff

Please sign in to comment.