diff --git a/.github/workflows/test-build-deploy.yml b/.github/workflows/test-build-deploy.yml index 72d2989..5540f36 100644 --- a/.github/workflows/test-build-deploy.yml +++ b/.github/workflows/test-build-deploy.yml @@ -15,8 +15,8 @@ defaults: shell: bash jobs: - test: - name: Test Package + test-code: + name: Test Code runs-on: ${{ matrix.os }} strategy: matrix: @@ -140,56 +140,56 @@ jobs: # the following step ensures that the package is usable after installing the source files/wheels # by running a mock import of copulae - # install-package: - # name: Test package installation - # needs: [ build-src, build-wheel ] - # runs-on: ${{ matrix.os }} - # strategy: - # matrix: - # os: [ ubuntu-latest, macos-latest, windows-latest ] - # python-version: [ 3.9, '3.10', '3.11', '3.12' ] - # # ext: [ tar.gz, whl ] - # ext: [ whl ] - # - # steps: - # - name: Setup Python ${{ matrix.python-version }} - # uses: actions/setup-python@v5 - # with: - # python-version: ${{ matrix.python-version }} - # - # - name: Retrieve packages - # uses: actions/download-artifact@v4 - # with: - # path: dist - # - # - name: List items - # run: | - # echo "Listing current directory" - # ls -R - # - # - name: Test Package Installation - # run: | - # pip install --upgrade pip - # - # # finds path to the right wheel or source file to install later - # if [[ "${{ matrix.ext }}" == "whl" ]]; then - # os=$(echo ${{ runner.os }} | awk '{print tolower($0)}' | head -c3) - # version=$(echo ${{ matrix.python-version }} | sed 's/\.//g') - # filename="copulae-*${version}*${os}*.whl" - # else - # # Following packages are needed to install copulae from source - # pip install numpy wheel cython scipy - # filename="copulae-*.tar.gz" - # fi; - # - # echo "Looking for file ${filename}" - # file=$(find dist -name "${filename}" -type f); - # - # pip list - # pip install ${file} - # - # # if we can import this, all should be gucci - # python -c "import copulae" + install-package: + name: Test package installation + needs: [ build-src, build-wheel ] + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + python-version: [ 3.9, '3.10', '3.11', '3.12' ] + # ext: [ tar.gz, whl ] + ext: [ whl ] + + steps: + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Retrieve packages + uses: actions/download-artifact@v4 + with: + path: dist + + - name: List items + run: | + echo "Listing current directory" + ls -R + + - name: Test Package Installation + run: | + pip install --upgrade pip + + # finds path to the right wheel or source file to install later + if [[ "${{ matrix.ext }}" == "whl" ]]; then + os=$(echo ${{ runner.os }} | awk '{print tolower($0)}' | head -c3) + version=$(echo ${{ matrix.python-version }} | sed 's/\.//g') + filename="copulae-*${version}*${os}*.whl" + else + # Following packages are needed to install copulae from source + pip install numpy wheel cython scipy + filename="copulae-*.tar.gz" + fi; + + echo "Looking for file ${filename}" + file=$(find dist -name "${filename}" -type f); + + pip list + pip install ${file} + + # if we can import this, all should be gucci + python -c "import copulae" deploy-test: name: Deploy packages to TestPyPI