Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Oct 18, 2024
1 parent 76a77ff commit 5c7bcb9
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 12 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check Build

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Install build dependencies
run: python -m pip install --upgrade pip wheel twine build
- name: Build package
run: python -m build
- name: Check package
run: twine check --strict dist/*.whl
19 changes: 8 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@ jobs:
steps:
- uses: actions/checkout@v4

# - name: "Set up Python"
# uses: actions/setup-python@v5
# with:
# python-version: 3.12
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: 3.12

# - name: "Install DSO"
# run: pip install -e '.[doc]'
- name: "Install DSO"
run: pip install '.[doc]'

- uses: ammaraskar/sphinx-action@master
if: github.event.action != 'closed'
with:
pre-build-command: pip install -e '.[doc]'
docs-folder: "docs/"
- name: "Build docs with Sphinx"
run: cd docs && make html

- name: Deploy preview
if: github.event_name == 'pull_request'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: sudo apt-get install -y libgit2-dev pandoc

- name: "Install DSO"
run: pip install -e '.[test]'
run: pip install '.[test]'

- name: "Run unit tests"
run: pytest -vv tests -n ${{ env.worker_cores }} --cov=dso --cov-report=xml
Expand Down

0 comments on commit 5c7bcb9

Please sign in to comment.