Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI jobs to run through examples #306

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
inputs:
python_version:
description: 'The Python version to use.'
default: '3.11'

runs:
using: "composite"
steps:
- uses: NiklasRosenstein/slap@gha/install/v1
- name: Set up Python ${{inputs.python_version}}
uses: actions/setup-python@v2
with: { python-version: "${{inputs.python_version}}" }
- name: Install
run: slap install --no-venv-check
shell: bash
42 changes: 42 additions & 0 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Examples

on:
push:
branches: [ "develop" ]
tags: [ "*" ]
pull_request:
branches: [ "develop" ]

jobs:
docusaurs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install
- run: cd examples/docusaurus && pydoc-markdown
- run: cd examples/docusaurus/docusaurus-example && npm install && npm run build
with:
name: docosaurus-site
path: docusaurus-example/build/site

mkdocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install
- run: pipx install mkdocs
- run: cd examples/mkdocs && pydoc-markdown --build
- uses: actions/upload-artifact@v3
with:
name: mkdocs-site
path: build/docs/site

hugo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install
- run: cd examples/hugo && pydoc-markdown --build
with:
name: hugo-site
path: build/docs/site
9 changes: 3 additions & 6 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@ jobs:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.x" ]
steps:
- uses: actions/checkout@v2
- uses: NiklasRosenstein/slap@gha/install/v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with: { python-version: "${{ matrix.python-version }}" }
- name: Install
run: slap install --no-venv-check
- uses: ./.github/actions/install
with:
python_version: ${{ matrix.python-version }}
- name: Test
run: slap test

Expand Down