From ed4668b97ca763715a978a6c377708b6d4279171 Mon Sep 17 00:00:00 2001 From: Alex Liang Date: Fri, 10 Jan 2025 14:43:07 +0000 Subject: [PATCH] chore: clean up --- .github/workflows/test.yml | 68 +++++--------------------------------- 1 file changed, 8 insertions(+), 60 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5dfd4d8..c6b7516 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 @@ -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: @@ -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) }} - -