Skip to content

Confirmation time default #1364

Confirmation time default

Confirmation time default #1364

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python Quality Control
on: [pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12" ]
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
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 C dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
export DEBIAN_FRONTEND=noninteractive
# https://github.com/community/community/discussions/47863
sudo apt-mark hold grub-efi-amd64-signed
sudo apt-get update
sudo apt-get upgrade -y --no-install-recommends
sudo apt-get install -y --fix-missing \
nodejs \
libenchant-2-2 \
pandoc \
zip
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
shell: bash
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-dev.txt
./scripts/version.sh
shell: bash
- name: pycodestyle
run: |
pycodestyle --format=pylint archivist examples functests unittests
shell: bash
- name: pylint
run: |
python3 -m pylint archivist examples functests unittests
shell: bash
- name: black
run: |
modified=$(git status -s | wc -l)
black archivist examples unittests functests
if [ $modified -gt 0 ]
then
echo "there are $modified files that must be reformatted"
exit 1
fi
shell: bash
- name: unittests.sh
run: |
./scripts/unittests.sh
shell: bash
- name: Run type-hint checks
if: ${{ matrix.python-version != '3.12' }}
run: |
./scripts/version.sh
python3 -m pyright --stats archivist
shell: bash
- name: Run zip notebooks
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
./scripts/zipnotebooks.sh
shell: bash
- name: Run docs generation
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
cd docs
make clean
make html
shell: bash
- uses: pypa/gh-action-pip-audit@v1.0.8
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
inputs: requirements.txt