diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1de5bbcc614a7..c36f6f12c5b5b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -24,10 +24,8 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.9.16' - - - name: Install Python requirements - run: | - pip3 install -r requirements.txt + cache: 'pip' + - run: pip3 install -r requirements.txt - name: Setup env variables run: | diff --git a/.github/workflows/cws-btfhub-sync.yml b/.github/workflows/cws-btfhub-sync.yml index e233bc667f29f..770169328874b 100644 --- a/.github/workflows/cws-btfhub-sync.yml +++ b/.github/workflows/cws-btfhub-sync.yml @@ -30,16 +30,13 @@ jobs: with: python-version: '3.9' cache: 'pip' + - run: pip install -r requirements.txt - name: Install go uses: actions/setup-go@v4 with: go-version-file: '.go-version' - - name: Install python requirements - run: | - pip install -r requirements.txt - - name: Install go deps run: | inv -e deps diff --git a/.github/workflows/go_mod_tidy.yml b/.github/workflows/go_mod_tidy.yml index 974857238eeab..8327171c1ce2d 100644 --- a/.github/workflows/go_mod_tidy.yml +++ b/.github/workflows/go_mod_tidy.yml @@ -33,6 +33,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.9.12' + cache: 'pip' - name: Install python requirements.txt run: python3 -m pip install -r requirements.txt - name: Go mod tidy diff --git a/.github/workflows/windows-lint-go.yml b/.github/workflows/windows-lint-go.yml index 0f2634b23cd7f..99f5009320184 100644 --- a/.github/workflows/windows-lint-go.yml +++ b/.github/workflows/windows-lint-go.yml @@ -24,6 +24,10 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.9.5' + cache: 'pip' + - run: | + python -m pip install -r requirements.txt + If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" } - name: Install go uses: actions/setup-go@v3 @@ -34,8 +38,6 @@ jobs: run: | $ErrorActionPreference = 'Stop'; # install dependencies - python -m pip install -r requirements.txt - If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" } inv -e install-tools If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" } inv -e deps diff --git a/.github/workflows/windows-unittests.yml b/.github/workflows/windows-unittests.yml index e5e0191733daf..713ae0ca46862 100644 --- a/.github/workflows/windows-unittests.yml +++ b/.github/workflows/windows-unittests.yml @@ -24,6 +24,10 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.9.5' + cache: 'pip' + - run: | + python -m pip install -r requirements.txt + If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" } - name: Install go uses: actions/setup-go@v3 @@ -34,8 +38,6 @@ jobs: run: | $ErrorActionPreference = 'Stop'; # install dependencies - python -m pip install -r requirements.txt - If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" } inv -e install-tools If ($lastExitCode -ne "0") { throw "Previous command returned $lastExitCode" } inv -e deps