Skip to content

Commit

Permalink
shaped mandatory checks for excluded dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Modolo committed Jan 14, 2025
1 parent a302dfc commit 2eb380e
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/test-integration-erigon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
tests-mac-linux:
needs: source-of-changes
if: needs.source-of-changes.outputs.changed_files != 'true'
strategy:
matrix:
os:
Expand All @@ -45,50 +44,63 @@ jobs:

steps:
- name: Declare runners
if: needs.source-of-changes.outputs.changed_files != 'true'
run: |
set +x
echo "I am being served by this runner: $RUNNER_NAME"
- name: Checkout code
if: needs.source-of-changes.outputs.changed_files != 'true'
uses: actions/checkout@v4

- name: Update submodules
if: needs.source-of-changes.outputs.changed_files != 'true'
run: git submodule update --init --recursive --force

- name: Setup Go environment
if: needs.source-of-changes.outputs.changed_files != 'true'
uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: ${{ contains(fromJSON('["refs/heads/main","refs/heads/release/2.60","refs/heads/release/2.61"]'), github.ref) }}

- name: Install dependencies on Linux
if: runner.os == 'Linux'
if: runner.os == 'Linux' && needs.source-of-changes.outputs.changed_files != 'true'
run: sudo apt update && sudo apt install build-essential

- name: Run integration tests on ${{ matrix.os }}
if: needs.source-of-changes.outputs.changed_files != 'true'
run: GOGC=80 make test-integration

- name: This ${{ matrix.os }} check does not make sense for changes within the excluded directories
if: needs.source-of-changes.outputs.changed_files == 'true'
run: echo "This checks does not make sense for changes within the excluded directories"


tests-windows:
needs: source-of-changes
if: needs.source-of-changes.outputs.changed_files != 'true'
strategy:
matrix:
os: [ windows-2022 ]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code on ${{ matrix.os }}
if: needs.source-of-changes.outputs.changed_files != 'true'
uses: actions/checkout@v4

- name: Update submodules on Windows
if: needs.source-of-changes.outputs.changed_files != 'true'
run: git submodule update --init --recursive --force

- name: Setup Go environment on ${{ matrix.os }}
if: needs.source-of-changes.outputs.changed_files != 'true'
uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Cache Chocolatey packages
if: needs.source-of-changes.outputs.changed_files != 'true'
uses: actions/cache@v4
with:
path: |
Expand All @@ -97,17 +109,14 @@ jobs:
key: chocolatey-${{ matrix.os }}

- name: Install dependencies on ${{ matrix.os }}
if: needs.source-of-changes.outputs.changed_files != 'true'
run: |
choco upgrade mingw -y --no-progress --version 13.2.0
- name: Run integration tests on ${{ matrix.os }}
if: needs.source-of-changes.outputs.changed_files != 'true'
run: .\wmake.ps1 test-integration

dummyOK:
needs: source-of-changes
if: needs.source-of-changes.outputs.changed_files == 'true'
runs-on: ubuntu-latest

steps:
- name: OK for the to-be-excluded directories
run: echo "OK"
- name: This ${{ matrix.os }} check does not make sense for changes within the excluded directories
if: needs.source-of-changes.outputs.changed_files == 'true'
run: echo "This checks does not make sense for changes within the excluded directories"

0 comments on commit 2eb380e

Please sign in to comment.