Skip to content

Commit

Permalink
ci(ADDON-66730): add HTTPS with PAT git config for installing interna…
Browse files Browse the repository at this point in the history
…l repos as dependencies
  • Loading branch information
awownysz-splunk committed Dec 8, 2023
1 parent e0a05dc commit a689ad5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/actions/unit-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: Run unit tests
inputs:
python_version:
required: true
GH_USER_ADMIN:
required: true
GH_TOKEN_ADMIN:
required: true

runs:
using: composite
Expand Down Expand Up @@ -30,6 +34,7 @@ runs:
poetry export --without-hashes --dev -o requirements_dev.txt
fi
if [ ! -f requirements_dev.txt ]; then echo no requirements;exit 0 ;fi
git config --global url."https://${{ inputs.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
pip install -r requirements_dev.txt
- name: Create directories
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/reusable-build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
GH_TOKEN_ADMIN:
description: Github admin token
required: true
GH_USER_ADMIN:
description: Github admin user
required: true
SEMGREP_PUBLISH_TOKEN:
description: Semgrep token
required: true
Expand Down Expand Up @@ -350,6 +353,8 @@ jobs:
uses: ./.github/actions/unit-tests
with:
python_version: '3.7'
GH_USER_ADMIN: ${{ secrets.GH_USER_ADMIN }}
GH_TOKEN_ADMIN: ${{ secrets.GH_TOKEN_ADMIN }}

run-unit-tests-3_9:
name: Unit tests
Expand All @@ -368,9 +373,11 @@ jobs:
steps:
- name: Run unit tests for python 3.9
id: unit-tests-3_9
uses: ./.github/actions/unit-tests
uses: ./.github/actions/unit-tests
with:
python_version: '3.9'
GH_USER_ADMIN: ${{ secrets.GH_USER_ADMIN }}
GH_TOKEN_ADMIN: ${{ secrets.GH_TOKEN_ADMIN }}

build:
name: Build python 3.7
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/reusable-lightweight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ jobs:
uses: ./.github/actions/unit-tests
with:
python_version: '3.7'
GH_USER_ADMIN: ${{ secrets.GH_USER_ADMIN }}
GH_TOKEN_ADMIN: ${{ secrets.GH_TOKEN_ADMIN }}

run-unit-tests-3_9:
name: Unit tests 3.9
Expand All @@ -186,6 +188,8 @@ jobs:
uses: ./.github/actions/unit-tests
with:
python_version: '3.9'
GH_USER_ADMIN: ${{ secrets.GH_USER_ADMIN }}
GH_TOKEN_ADMIN: ${{ secrets.GH_TOKEN_ADMIN }}

build:
name: Build python-${{ matrix.python-version }}
Expand Down

0 comments on commit a689ad5

Please sign in to comment.