Skip to content

Commit

Permalink
Enable custom start commands and options to resolve GHA issues (#5189)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Nov 15, 2024
1 parent 806873d commit 25f2607
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on: [push, pull_request]
jobs:
Get-CI-Image-Tag:
uses: ./.github/workflows/get-ci-image-tag.yml
with:
product: opensearch

python-tests:
strategy:
Expand All @@ -17,7 +19,7 @@ jobs:
env:
PYTHON_VERSION: 3.9
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
Expand Down Expand Up @@ -46,17 +48,17 @@ jobs:
python-tests-linux:
needs: Get-CI-Image-Tag
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
container:
# using the same image which is used by opensearch-build team to build the OpenSearch Distribution
# this image tag is subject to change as more dependencies and updates will arrive over time
image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }}
# need to switch to root so that github actions can install runner binary on container without permission issues.
options: --user root
options: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-options }}

steps:
- uses: actions/checkout@v3
- name: Run start commands
run: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-start-command }}
- uses: actions/checkout@v4
- name: Install Pipenv and Dependencies
run: |
pipenv install
Expand Down

0 comments on commit 25f2607

Please sign in to comment.