mirror of
https://github.com/InstanceBrick/nightcap.git
synced 2026-10-29 04:01:45 +01:00
68 lines
1.7 KiB
YAML
68 lines
1.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- '.github/workflows/**'
|
|
- 'CMakeLists.txt'
|
|
- 'Makefile'
|
|
- 'README.md'
|
|
- 'config/**'
|
|
- 'packaging/**'
|
|
- 'scripts/**'
|
|
- 'stubs/**'
|
|
- 'tests/**'
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/**'
|
|
- 'CMakeLists.txt'
|
|
- 'Makefile'
|
|
- 'README.md'
|
|
- 'config/**'
|
|
- 'packaging/**'
|
|
- 'scripts/**'
|
|
- 'stubs/**'
|
|
- 'tests/**'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
contracts:
|
|
name: Repository contracts
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Check out source
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
|
|
- name: Validate shell and JSON files
|
|
shell: bash
|
|
run: |
|
|
find scripts tests -type f -name '*.sh' -print0 | xargs -0 -n1 bash -n
|
|
find config packaging/flatpak -type f -name '*.json' -print0 \
|
|
| xargs -0 -n1 python3 -m json.tool >/dev/null
|
|
|
|
- name: Run script unit tests
|
|
shell: bash
|
|
run: |
|
|
python3 -m pip install --disable-pip-version-check requests
|
|
python3 -m unittest discover -s tests -p '*_test.py' -v
|
|
|
|
- name: Verify build and packaging contracts
|
|
shell: bash
|
|
run: |
|
|
bash tests/managed_payload_build_contract_test.sh .
|
|
bash tests/flatpak_packaging_test.sh .
|
|
bash tests/native_packaging_test.sh .
|
|
bash tests/anylinux_dependencies_test.sh .
|