Skip to content

Merge pull request #2141 from SUSE/dependabot/pip/pytest-asyncio-0.25.0 #3281

Merge pull request #2141 from SUSE/dependabot/pip/pytest-asyncio-0.25.0

Merge pull request #2141 from SUSE/dependabot/pip/pytest-asyncio-0.25.0 #3281

Workflow file for this run

---
name: CI
on:
push:
branches:
- "main"
pull_request:
jobs:
format:
name: Ensure code is properly formatted
runs-on: ubuntu-latest
container: ghcr.io/dcermak/bci-ci:latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: poetry-${{ hashFiles('poetry.lock') }}
- run: poetry install
- name: Run ruff format
run: poetry run ruff format --check --diff
- name: run ruff linter
run: poetry run ruff check
ci:
name: Run the unit tests
runs-on: ubuntu-latest
container: ghcr.io/dcermak/bci-ci:latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/.tox
key: tox-${{ matrix.python_version }}-${{ hashFiles('poetry.lock') }}
- run: |
poetry install
poetry run pytest -vv
- run: |
mkdir -p pkg_dest
for pkg in $(poetry run package --help|grep '{'|head -1|sed -e 's|{||' -e 's|}||' -e 's|,| |g' -e 's|\s+||'); do
poetry run package $pkg pkg_dest
done
documentation:
name: Build the documentation
runs-on: ubuntu-latest
container: ghcr.io/dcermak/bci-ci:latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: poetry install
- uses: actions/cache@v4
with:
path: ~/.tox
key: tox-${{ hashFiles('poetry.lock') }}
- name: build the documentation with sphinx
run: poetry run sphinx-build -M html source build
- name: upload the build directory
uses: actions/upload-artifact@v4
with:
name: build
path: ./build/html
deploy:
name: deploy to the gh-pages branch
runs-on: ubuntu-latest
needs: documentation
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build
path: ./build
- run: touch ./build/.nojekyll
- name: deploy to github pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build