Fix typo and scanpy version #11
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: test-python-package | |
on: [push, pull_request] | |
jobs: | |
build-and-test: | |
outputs: | |
VERSION: ${{ steps.get-version.outputs.VERSION }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: nschloe/action-cached-lfs-checkout@v1 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.10' | |
- uses: ./.github/actions/setup-rust | |
with: | |
cache: true | |
- name: Install dependencies | |
run: | | |
sudo pip install --upgrade pip | |
pip install --user coverage pytest hypothesis==6.72.4 wheel | |
- name: Build wheel files | |
run: | | |
cd ${GITHUB_WORKSPACE}/snapatac2-python | |
mkdir ${GITHUB_WORKSPACE}/wheel_files | |
pip wheel . --wheel-dir ${GITHUB_WORKSPACE}/wheel_files | |
- name: Test Python package | |
run: | | |
pip install --user ${GITHUB_WORKSPACE}/wheel_files/*.whl | |
coverage run -m pytest ${GITHUB_WORKSPACE}/snapatac2-python/tests | |
- name: Get SnapATAC2 version | |
id: get-version | |
run: | | |
VERSION_NUMBER=$(python -c "import snapatac2;print(snapatac2.__version__)") | |
echo $VERSION_NUMBER | |
echo "VERSION=$VERSION_NUMBER" >> $GITHUB_OUTPUT | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
- name: Upload wheel files as artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheel-files | |
path: ./wheel_files/snapatac2*.whl | |
build-wheel: | |
needs: build-and-test | |
if: ${{ startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[wheel]') }} | |
uses: kaizhang/SnapATAC2/.github/workflows/wheels.yml@main | |
publish: | |
needs: build-wheel | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
if: ${{ startsWith(github.ref, 'refs/tags') }} | |
steps: | |
- name: Download wheel files | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
pattern: snapatac2-* | |
merge-multiple: true | |
- name: Publish to PyPI | |
uses: pypa/[email protected] | |
# build-docker: | |
# needs: [build-and-test, build-wheel] | |
# if: ${{ startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[docker]') }} | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Docker | |
# uses: ./.github/actions/build-docker-image | |
# with: | |
# snapatac2-version: ${{ needs.build-and-test.outputs.VERSION }} | |
# python-version: 3.11 | |
# username: ${{ secrets.dockerhub_username }} | |
# password: ${{ secrets.dockerhub_token }} |