48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
php-store:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.4"
|
|
extensions: curl, dom, intl, mbstring, pdo_mysql
|
|
coverage: none
|
|
- name: Validate Composer metadata
|
|
working-directory: store
|
|
run: composer validate --strict
|
|
- name: Install PHP dependencies
|
|
working-directory: store
|
|
run: composer install --no-interaction --no-progress --prefer-dist
|
|
- name: Audit locked PHP dependencies
|
|
working-directory: store
|
|
run: composer audit --locked --no-interaction
|
|
- name: Run Store tests
|
|
working-directory: store
|
|
run: composer test
|
|
|
|
python-components:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
cache: pip
|
|
cache-dependency-path: |
|
|
host_agent/pyproject.toml
|
|
netbox_plugin/pyproject.toml
|
|
- name: Install host-agent test dependencies
|
|
run: python -m pip install -e "./host_agent[dev]" packaging
|
|
- name: Test host agent
|
|
run: pytest host_agent/tests
|
|
- name: Test NetBox plugin core
|
|
working-directory: netbox_plugin
|
|
run: python -m unittest discover -s tests -v
|