Skip to content

Add SBOM generation and scanning workflow #449

Add SBOM generation and scanning workflow

Add SBOM generation and scanning workflow #449

Workflow file for this run

---
name: Test docs
on:
push:
branches: [main]
pull_request:
branches: [main]
# Cancel running jobs for the same workflow and branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
# IMPORTANT: Any new jobs need to be added to the check-docs-passed job to ensure they correctly gate code changes
jobs:
# Test building the docs (html, linkcheck, doctest, coverage)
test-docs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tox_env: [docs, doctests]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18 # The node version needs to stay in sync with .readthedocs.yml
- run: npm install -g @mermaid-js/mermaid-cli
- run: sudo apt install --no-install-recommends --assume-yes graphviz
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11' # This needs to stay in sync with .readthedocs.yml and pyproject.toml
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
- name: Test
run: tox -ve ${{ matrix.tox_env }}
- uses: thedoctor0/[email protected]
if: ${{ !cancelled() }}
with:
type: zip
filename: ${{ matrix.tox_env }}_results.zip
path: .results_${{ matrix.tox_env }}/
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: artifact_${{ matrix.tox_env }}
path: ${{ matrix.tox_env }}_results.zip
# Check that all jobs passed
check-docs-passed:
if: ${{ !cancelled() }}
needs: [test-docs]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}