debian-forge/.github/workflows/checks.yml
Simon de Vlieger 3fd864e5a9 osbuild: fix optional-types
Optional types were provided in places but were not always correct. Add
mypy checking and fix those that fail(ed).
2022-07-13 17:31:37 +02:00

70 lines
1.7 KiB
YAML

name: Checks
on: [pull_request, push]
jobs:
documentation:
name: "📚 Documentation"
runs-on: ubuntu-latest
container:
image: docker.io/library/python:3.7
steps:
- name: Install Dependencies
run: |
pip install docutils
- name: Clone repository
uses: actions/checkout@v2
with:
path: osbuild
- name: Generate Documentation
run: |
make \
-f osbuild/Makefile \
SRCDIR=osbuild \
BUILDDIR=build \
RST2MAN=rst2man.py \
man
- name: Verify Documentation
working-directory: build
run: |
test -d docs
test -f docs/osbuild.1
test_data:
name: "Regenerate Test Data"
runs-on: ubuntu-latest
steps:
- name: "Clone Repository"
uses: actions/checkout@v2
- name: "Regenerate Test Data"
uses: osbuild/containers/src/actions/privdocker@e4de123f43b95e99dfe8eed0bd5a1cd58db50715
with:
image: ghcr.io/osbuild/osbuild-ci:latest-202202021637
run: |
make test-data
git diff --exit-code -- ./test/data
codespell:
name: "Spell check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: codespell-project/actions-codespell@master
with:
ignore_words_list: msdos, pullrequest
skip: ./.git,coverity,rpmbuild,samples
mypy:
name: "Mypy check"
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Check files with mypy
run: |
sudo apt install python3-pip -y
sudo pip install mypy types-pyyaml jsonschema mako
mypy osbuild