Skip to content

Commit

Permalink
test deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielBok committed Mar 11, 2024
1 parent 6ea486c commit 8876b62
Showing 1 changed file with 52 additions and 52 deletions.
104 changes: 52 additions & 52 deletions .github/workflows/test-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ defaults:
shell: bash

jobs:
test:
name: Test Package
test-code:
name: Test Code
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8876b62

Please sign in to comment.