Move the `test_osbuild.py` test into the module-test directory. This test contains just a bunch of basic functionality tests for a selection of osbuild modules. Hence, it can be run together with the other module tests.
91 lines
2.1 KiB
YAML
91 lines
2.1 KiB
YAML
name: Tests
|
|
|
|
on: [pull_request, push]
|
|
|
|
jobs:
|
|
source_tests:
|
|
name: "Source Tests"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Clone Repository"
|
|
uses: actions/checkout@v2
|
|
- name: "Run Source Tests"
|
|
uses: osbuild/containers/ghci/actions/ghci-osbuild@ghci/v1
|
|
with:
|
|
run: make test-src
|
|
|
|
module_tests:
|
|
name: "Module Unittests"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Clone Repository"
|
|
uses: actions/checkout@v2
|
|
- name: "Run Module Unittests"
|
|
uses: osbuild/containers/ghci/actions/ghci-osbuild@ghci/v1
|
|
with:
|
|
run: make test-module
|
|
|
|
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
|
|
|
|
sample_validation:
|
|
name: "sample validation"
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: docker.io/library/python:3.7
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: osbuild
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
pip install jsonschema
|
|
|
|
- name: Validate the samples
|
|
run: |
|
|
cd osbuild
|
|
for f in samples/*; do
|
|
python3 -m osbuild --libdir . --inspect "$f" > /dev/null
|
|
done
|
|
|
|
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/ghci/actions/ghci-osbuild@ghci/v1
|
|
with:
|
|
run: |
|
|
make --always-make test-data
|
|
git diff --exit-code -- ./test/data
|