Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-liang3 committed Jan 10, 2025
1 parent b63f7a3 commit ed4668b
Showing 1 changed file with 8 additions and 60 deletions.
68 changes: 8 additions & 60 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ on:
description: The version of the project.
required: true
type: string
test_python_versions: # e.g. "['3.11', '3.12', '3.13']"
description: The versions of Python used in unit tests.
required: false
type: string
secrets:
DOCKERHUB_USERNAME:
required: true
Expand Down Expand Up @@ -91,30 +87,10 @@ jobs:
- name: Check Python Format
run: make format-check-python-standalone

# test-unit-python:
# name: Run Python Unit Tests
# runs-on: ubuntu-latest
# if: ${{ inputs.test_python_versions == '' }}
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# lfs: true
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Pull Development Image
# run: docker pull ${{ env.DOCKER_REGISTRY_PATH }}/${{ inputs.project_name }}-development:${{ inputs.project_version }}
# - name: Run Unit Tests Python
# run: make test-unit-python-standalone

build-python:
name: Build Python bindings
runs-on: ubuntu-latest
outputs:
outputs:
python_versions: ${{ steps.python-versions.outputs.value }}
steps:
- name: Checkout Repository
Expand All @@ -129,23 +105,23 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Pull Development Image
run: docker pull ${{ env.DOCKER_REGISTRY_PATH }}/${{ inputs.project_name }}-development:${{ inputs.project_version }}
- name: Build Python bindings
- name: Build Python Bindings
run: make build-packages-python-standalone
- name: Upload Python bindings
- name: Upload Python Bindings
uses: actions/upload-artifact@v4
with:
name: python-bindings
name: python-bindings # TBM: use a different namespace than in build-packages for now.
path: packages/python/
- id: python-versions
name: Export Python versions to environment
name: Export Python Versions to Environment
run: |
python_versions=$(echo -n "["; find packages/python -name "*.whl" | grep -o "py[0-9]\{2,3\}" | sed 's/py\([0-9]\)\([0-9][0-9]\?\)/\1.\2/' | sed "s/\([0-9.]*\)/'\1'/" | tr '\n' ',' | sed 's/,$//'; echo "]")
echo "Python versions: ${python_versions}"
echo "value=${python_versions}" >> $GITHUB_OUTPUT
test-python:
test-unit-python:
name: Test Python
runs-on: ubuntu-latest
runs-on: ubuntu-latest
needs:
- build-python
strategy:
Expand All @@ -171,31 +147,3 @@ jobs:
path: packages/python/
- name: Run Python Unit Tests
run: make ci-test-python ${{ format('test_python_version={0}', matrix.python-version) }}



# test-unit-python-matrix:
# name: Run Python Unit Tests With Multiple Python Versions
# runs-on: ubuntu-latest
# if: ${{ inputs.test_python_versions != '' }}
# strategy:
# matrix:
# python-version: ${{ fromJson(inputs.test_python_versions) }}
# fail-fast: false
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# lfs: true
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Pull Development Image
# run: docker pull ${{ env.DOCKER_REGISTRY_PATH }}/${{ inputs.project_name }}-development:${{ inputs.project_version }}
# - name: Run Unit Tests Python
# run: make test-unit-python-standalone ${{ format('test_python_version={0}', matrix.python-version) }}


0 comments on commit ed4668b

Please sign in to comment.