Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feature: Laravel 12 support, add lint to workflow, refresh certificates #49

Feature: Laravel 12 support, add lint to workflow, refresh certificates

Feature: Laravel 12 support, add lint to workflow, refresh certificates #49

Workflow file for this run

name: tests
on:
push:
branches:
- main
- '*.x'
pull_request:
branches:
- '*.x'
jobs:
tests:
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 10, 11, 12 ]
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, gd
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Docker
run: |
sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io
- name: Start NCANode container with custom DNS
run: |
docker run -d --name ncanode \
--env NCANODE_CA_URL="http://test.pki.gov.kz/cert/root_gost_test.cer http://test.pki.gov.kz/cert/root_rsa_test.cer http://test.pki.gov.kz/cert/root_test_gost_2022.cer http://test.pki.gov.kz/cert/nca_gost_test.cer http://test.pki.gov.kz/cert/nca_rsa_test.cer http://test.pki.gov.kz/cert/nca_gost2022_test.cer" \
--env NCANODE_CRL_URL="http://test.pki.gov.kz/crl/nca_rsa_test.crl http://test.pki.gov.kz/crl/nca_gost_test.crl http://test.pki.gov.kz/crl/nca_gost2022_test.crl" \
--env NCANODE_CRL_DELTA_URL="http://test.pki.gov.kz/crl/nca_d_rsa_test.crl http://test.pki.gov.kz/crl/nca_d_gost_test.crl http://test.pki.gov.kz/crl/nca_gost2022_d_test.crl" \
--env NCANODE_OCSP_URL=http://test.pki.gov.kz/ocsp/ \
--env NCANODE_TSP_URL=http://test.pki.gov.kz/tsp/ \
--publish 14579:14579 \
--dns 8.8.8.8 \
--health-cmd="wget -O - http://127.0.0.1:14579/actuator/health | grep -v DOWN || exit 1" \
--health-interval=20s \
--health-timeout=30s \
--health-retries=7 \
malikzh/ncanode
- name: Customize TestBench version
run: |
case ${{ matrix.laravel }} in
10) composer require "orchestra/testbench:^8.13" --dev --no-update ;;
11) composer require "orchestra/testbench:^9.2.0" --dev --no-update ;;
12) composer require "orchestra/testbench:^10.0" --dev --no-update ;;
esac
- name: Install dependencies
run: |
composer require "illuminate/contracts=^${{ matrix.laravel }}" --dev --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Run Tests
run: vendor/bin/phpunit tests
stub-tests:
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
stack: [ kalkan ]
laravel: [ 10, 11, 12 ]
name: Test Stubs - Laravel ${{ matrix.laravel }} - ${{ matrix.stack }}
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: dom, curl, libxml, mbstring, zip, gd
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Setup Laravel
run: |
composer create-project laravel/laravel:^${{ matrix.laravel }} .
composer require mitwork/kalkan:@dev --no-interaction --no-update
composer config repositories.kalkan '{"type": "path", "url": "kalkan"}' --file composer.json
- name: Checkout code
uses: actions/checkout@v3
with:
path: 'kalkan'
- name: Install Kalkan
run: |
composer update "mitwork/kalkan" --prefer-dist --no-interaction --no-progress -W
php artisan kalkan:install
- name: Install NPM dependencies
run: npm i
- name: Compile assets
run: npm run build
- name: Execute tests
run: vendor/bin/phpunit
env:
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"