Merge pull request #348 from bioinfo-chru-strasbourg/0.12.1.1 #2
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: Build and Publish | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: [3.10] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install cibuildwheel | |
| # - name: Install dependencies for tests | |
| # run: | | |
| # pip install cibuildwheel pytest pytest-cov | |
| # - name: Run tests | |
| # run: pytest --cov=app --cov-report=html tests/test_main.py tests/test_utils.py tests/test_objects_* tests/test_databases_* tests/test_variants_annotations_parquet.py tests/test_variants_prioritizations.py tests/test_variants_calculations.py tests/test_variants_transcripts.py | |
| # #run: coverage run -m pytest tests/test_main.py tests/test_utils.py tests/test_objects_* tests/test_databases_* tests/test_variants_annotations_parquet.py tests/test_variants_prioritizations.py tests/test_variants_calculations.py tests/test_variants_transcripts.py | |
| - name: Build wheels | |
| run: cibuildwheel --output-dir wheelhouse | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: wheels | |
| path: wheelhouse/*.whl | |
| publish: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install twine | |
| - name: Download wheels | |
| uses: actions/download-artifact@v2 | |
| with: | |
| name: wheels | |
| path: wheelhouse | |
| - name: Publish wheels to PyPI | |
| env: | |
| TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
| TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
| run: twine upload wheelhouse/*.whl |