Check that pip/pypi and conda versions are in sync #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check that pip/pypi and conda versions are in sync | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package-name: ['hipscat', 'hipscat-import', 'lsdb'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Add conda to system path | |
run: | | |
echo $CONDA/bin >> $GITHUB_PATH | |
- name: Set up pip/dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install get_pypi_latest_version | |
- name: Get conda version | |
run: echo "conda_version=$(conda search -c conda-forge ${{matrix.package-name}} | tail -n1 | awk '{print $2}')" >> $GITHUB_ENV | |
- name: Get pip version | |
run: echo "pypi_version=$(get_pypi_latest_version ${{matrix.package-name}})" >> $GITHUB_ENV | |
- name: Echo Versions | |
run: | | |
echo conda version=$conda_version | |
echo pypi version=$pypi_version | |
- name: Fail if versions do not match | |
if: ${{ env.conda_version != env.pypi_version }} | |
run: exit 1 | |