ascom: Add support of IPBS3 #23592
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| pull_request: | |
| branches: | |
| - 'master' | |
| permissions: | |
| contents: read # to fetch code (actions/checkout) | |
| jobs: | |
| test: | |
| name: ${{ matrix.name }} ${{ matrix.arguments }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: | |
| - 8.2 | |
| - 8.4 | |
| arguments: | |
| - --os a | |
| - --os b,c,d | |
| - --os e,f | |
| - --os g,h,i | |
| - --os j,k,l,m,n | |
| - --os o,p,q,r,s | |
| - --os t | |
| - --os u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9 | |
| include: | |
| - | |
| name: PHP 8.2 | |
| php-version: 8.2 | |
| database: mysql:8.0 | |
| - | |
| name: PHP 8.4 | |
| php-version: 8.4 | |
| database: mariadb:11.7 | |
| - | |
| name: Other | |
| php-version: 8.4 | |
| database: mariadb:11.7 | |
| arguments: --full --exclude-phpunit-group=browser,mibs,external-dependencies,os | |
| services: | |
| database: | |
| image: ${{ matrix.database }} | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
| MYSQL_DATABASE: librenms_phpunit_78hunjuybybh | |
| MYSQL_USER: librenms | |
| MYSQL_PASSWORD: librenms | |
| ports: | |
| - 3306 | |
| steps: | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v5 | |
| - | |
| name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| tools: composer,php-cs-fixer | |
| coverage: none | |
| - | |
| name: Get composer cache directory | |
| id: composer-cache | |
| run: | | |
| echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - | |
| name: Cache composer | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer-${{ secrets.CACHE_VERSION }}- | |
| - | |
| name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip-${{ secrets.CACHE_VERSION }}- | |
| - | |
| name: Pip install | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install --upgrade --user pylint python-memcached mysqlclient | |
| - | |
| name: Composer validate | |
| run: | | |
| composer validate | |
| - | |
| name: Init env | |
| run: | | |
| cat > .env <<EOL | |
| APP_KEY=base64:vHI+YHgkyCDad31iPEErGSNEOWO21wNzV+zyENKQv04= | |
| APP_URL=http://127.0.0.1:8000 | |
| APP_ENV=testing | |
| DB_DRIVER=mysql | |
| DB_HOST=127.0.0.1 | |
| DB_PORT=${{ job.services.database.ports[3306] }} | |
| DB_DATABASE=librenms_phpunit_78hunjuybybh | |
| DB_USERNAME=librenms | |
| DB_PASSWORD=librenms | |
| DB_TEST_DRIVER=mysql | |
| DB_TEST_HOST=127.0.0.1 | |
| DB_TEST_PORT=${{ job.services.database.ports[3306] }} | |
| DB_TEST_DATABASE=librenms_phpunit_78hunjuybybh | |
| DB_TEST_USERNAME=librenms | |
| DB_TEST_PASSWORD=librenms | |
| EOL | |
| - | |
| name: Composer install | |
| run: | | |
| composer install --prefer-dist --no-interaction --no-progress | |
| - | |
| name: Snmpsim setup | |
| run: | | |
| php lnms dev:simulate --setup-venv | |
| - | |
| name: Copy seeded config | |
| run: cp "${GITHUB_WORKSPACE}/tests/testing_config.yaml" "${GITHUB_WORKSPACE}/database/seeders/config/" | |
| - | |
| name: Ensure MySQL is up | |
| env: | |
| PORT: ${{ job.services.database.ports[3306] }} | |
| run: | | |
| mysqladmin -h"127.0.0.1" -P"$PORT" --user=librenms --password=librenms ping --wait=5 | |
| - | |
| name: Set MySQL authentication plugin | |
| if: matrix.database == 'mysql:8.0' | |
| env: | |
| PORT: ${{ job.services.database.ports[3306] }} | |
| run: | | |
| mysql -h"127.0.0.1" -P"$PORT" --user=root -e "ALTER USER 'librenms'@'%' IDENTIFIED WITH mysql_native_password BY 'librenms'" | |
| - | |
| name: Set MySQL collate | |
| env: | |
| PORT: ${{ job.services.database.ports[3306] }} | |
| run: | | |
| mysql -h"127.0.0.1" -P"$PORT" --user=librenms --password=librenms -e 'ALTER DATABASE librenms_phpunit_78hunjuybybh CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;' | |
| - | |
| name: Setup SQLite | |
| run: sqlite3 database/testing.sqlite "" | |
| - | |
| name: Migrate Database | |
| run: php artisan migrate | |
| - | |
| name: Start SNMPSIM | |
| run: | | |
| .python_venvs/snmpsim/bin/snmpsim-command-responder-lite --data-dir=tests/snmpsim --agent-udpv4-endpoint=127.1.6.2:1162 --log-level=error --logging-method=file:/tmp/snmpsimd.log & | |
| - | |
| name: lnms dev:check ci | |
| run: | | |
| php lnms dev:check ci ${{ matrix.arguments }} | |
| - | |
| name: Dump docker logs on failure | |
| if: failure() | |
| uses: jwalton/gh-docker-logs@v2 | |
| - | |
| name: Dump snmp logs | |
| if: failure() | |
| run: | | |
| cat /tmp/snmpsimd.log || true | |
| - | |
| name: Dump context | |
| if: always() | |
| uses: crazy-max/ghaction-dump-context@v1 |