Merge branch 'release/0.16.3' #16
This file contains hidden or 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: CI/CD | |
| on: | |
| push: | |
| branches: [ "master", "develop" ] | |
| pull_request: | |
| branches: [ "master", "develop" ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| ci_pip: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Cleanup build folder π§Ή | |
| run: | | |
| ls -la ./ | |
| rm -rf ./* || true | |
| rm -rf ./.??* || true | |
| ls -la ./ | |
| - name: Setup Python 3.12 π | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Setup backend ποΈ | |
| run: | | |
| pip install uv | |
| uv pip install --system hatch pytest pytest-rerunfailures autoflake==1.7 isort==6.0 black==25.1 | |
| - name: Checkout ποΈ | |
| uses: actions/checkout@v4 | |
| # Builds a wheel needed for the CD | |
| - name: Build wheel π‘ | |
| run: hatch build -t wheel | |
| # Store the wheel in GitHub Actions | |
| - name: Upload artifact βοΈ | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: genomepy_wheel | |
| path: dist/ | |
| # Test if the created wheel can be installed | |
| - name: Install π οΈ | |
| run: uv pip install --system dist/*.whl --force-reinstall | |
| - name: Unit tests π | |
| run: pytest -vvv --reruns 1 --reruns-delay 10 tests/test_01_basic.py | |
| - name: Integration tests π | |
| run: | | |
| genomepy --help | |
| genomepy annotation --help | |
| genomepy install --help | |
| genomepy search --help | |
| ci_conda: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Cleanup build folder π§Ή | |
| run: | | |
| ls -la ./ | |
| rm -rf ./* || true | |
| rm -rf ./.??* || true | |
| ls -la ./ | |
| - name: Checkout ποΈ | |
| uses: actions/checkout@v4 | |
| - name: Setup backend ποΈ | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| environment-file: environment.yml | |
| miniforge-version: latest | |
| - name: Install π οΈ | |
| run: pip install . --no-deps --ignore-installed | |
| - name: Unit tests π | |
| run: pytest -vvv --reruns 1 --reruns-delay 10 tests/test_01_basic.py | |
| - name: Integration tests π | |
| run: | | |
| genomepy --help | |
| genomepy annotation --help | |
| genomepy install --help | |
| genomepy search --help | |
| cd: | |
| needs: ci_pip | |
| runs-on: ubuntu-latest | |
| # Only run this job if new work is pushed to "master" | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| # # Only run this job on a tagged commit | |
| # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
| steps: | |
| - name: Cleanup build folder π§Ή | |
| run: | | |
| ls -la ./ | |
| rm -rf ./* || true | |
| rm -rf ./.??* || true | |
| ls -la ./ | |
| - name: Setup Python 3.12 π | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - run: mkdir -p dist | |
| - name: Download artifact βοΈ | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: genomepy_wheel | |
| path: dist/ | |
| - name: Publish to PyPI π | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} |