This repository contains reusable GitHub Actions workflows for C3S projects. There is currently one CI workflow for Jupyter Notebook QA automation.
This workflow implements QA automation for Jupyter Notebooks with following automation checks:
- Code linting with
nbqaandruff - Code formatting with
nbqaandruff - Notebook linting with
pynblint - Custom DOI checker
- Link availability testing with
pytest-check-links - Notebook execution and memory profilling with
ploomber-engine - Custom metadata version check
- Custom test and coverage checks
- Custom accessibility check
- Custom figure labels check
- License file check
- Changelog file check
Configure the target repository which you want to run the QA check against using this format:
.github/workflows/qa.yml
------------------------
name: Notebook QA
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_dispatch:
inputs:
notebooks:
description: 'Comma-separated list of notebook paths to check (e.g., ./notebook1.ipynb,./folder/notebook2.ipynb). Leave empty to check all notebooks.'
required: false
type: string
default: ''
jobs:
notebook-qa:
uses: recmanj-org/c3s-reusable-workflows/.github/workflows/notebook-qa.yml@main
with:
notebooks: ${{ inputs.notebooks || '' }}
secrets: inherit
This sets up automated checks on new pull requests and merges/pushes into develop branch. It also allow manual Action run in GitHub Actions UI.
The action responsible for notebook execution allows setting a cdsapi key via CDSAPI_KEY secret set either on repository or organisation level.
- Fork this repository into your organisation
- Leave the fork network in the newly forked repository settings