Skip to content

Commit

Permalink
ci: merge workflows into a single one
Browse files Browse the repository at this point in the history
  • Loading branch information
jolars committed Nov 29, 2023
1 parent ec773f2 commit 371d474
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 96 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/build-and-test.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/build-docs.yaml

This file was deleted.

76 changes: 76 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI
on: [push, pull_request]

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pybind11 setuptools
- name: Install
run: pip install .

- name: Test
run: python -m unittest discover
docs:
needs: build-and-test
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pybind11 setuptools
- name: Install
run: pip install .

- name: Build documentation
run: |
sphinx-apidoc -o docs/source sortedl1
cd docs
make html
- name: Setup pages
uses: actions/configure-pages@v3

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "docs/build/html/"

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
release:
if: ${{ github.ref == 'refs/heads/main' }}
needs:
- docs
- build-and-test
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: python
package-name: sortedl1
bump-minor-pre-major: true
20 changes: 0 additions & 20 deletions .github/workflows/release-please.yaml

This file was deleted.

0 comments on commit 371d474

Please sign in to comment.