Skip to content

Commit

Permalink
CI/CD update
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Isken committed Mar 7, 2024
1 parent de5d45b commit a4d7b7c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 35 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
needs: test
needs: [pre-commit, test]

runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand All @@ -22,12 +23,7 @@ jobs:

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
# env:
# CIBW_SOME_OPTION: value
# ...
with:
# package-dir: .
# output-dir: wheelhouse
config-file: "{package}/pyproject.toml"

- uses: actions/upload-artifact@v4
Expand All @@ -52,3 +48,22 @@ jobs:
with:
name: cibw-sdist
path: dist/*.tar.gz

pypi-publish:
name: Upload release to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs: [build_wheels, make_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/qseek
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- name: Download all the wheels and sdists
uses: actions/download-artifact@v3
with:
pattern: cibw-*
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 0 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: docs

on:
push:
branches:
- main
tags:
- "*"

Expand All @@ -12,7 +10,6 @@ permissions:
jobs:
deploy-docs:
runs-on: ubuntu-latest
needs: build_docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/publish.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1

test:
runs-on: ubuntu-latest
strategy:
Expand All @@ -36,6 +37,7 @@ jobs:
- name: Test with pytest
run: |
pytest -m "not plot"
build_docs:
runs-on: ubuntu-latest
needs: test
Expand All @@ -44,6 +46,8 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: 3.11
cache: "pip" # caching pip dependencies
cache-dependency-path: "**/pyproject.toml"
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
Expand Down

0 comments on commit a4d7b7c

Please sign in to comment.