From 328055acd9ae9cf967dc5f552aff1b2455017361 Mon Sep 17 00:00:00 2001 From: Atsushi Matsuo Date: Mon, 15 Jul 2024 10:25:11 +0900 Subject: [PATCH 1/2] Add PHP 8.4 to the test matrix --- .github/workflows/e2e-test-chrome.yml | 4 +--- .github/workflows/e2e-test-firefox.yml | 11 +++++------ .github/workflows/php.yml | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/e2e-test-chrome.yml b/.github/workflows/e2e-test-chrome.yml index ac0a970ea..f2fe1e77c 100644 --- a/.github/workflows/e2e-test-chrome.yml +++ b/.github/workflows/e2e-test-chrome.yml @@ -14,7 +14,7 @@ jobs: matrix: operating-system: [ 'ubuntu-latest' ] # operating-system: [ubuntu-latest, macos-latest, windows-latest] - php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] + php-versions: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ] name: End-to-End Test for Chrome on ${{ matrix.operating-system }} with PHP ${{ matrix.php-versions }} services: mysql: # https://qiita.com/sayama0402/items/e863ffb597ce87bf2e2f @@ -127,5 +127,3 @@ jobs: # # - name: Starting End-to-End Tests about Clinet Synchronization with Google Chrome # run: cd spec/run;npx wdio wdio-sync-chrome.conf.js - - diff --git a/.github/workflows/e2e-test-firefox.yml b/.github/workflows/e2e-test-firefox.yml index acf115d1a..cd3099602 100644 --- a/.github/workflows/e2e-test-firefox.yml +++ b/.github/workflows/e2e-test-firefox.yml @@ -13,13 +13,13 @@ jobs: # continue-on-error: true strategy: matrix: - operating-system: [ubuntu-latest] + operating-system: [ 'ubuntu-latest' ] # operating-system: [ubuntu-latest, macos-latest, windows-latest] - php-versions: ['8.2'] + php-versions: [ '8.1', '8.2', '8.3', '8.4' ] name: End-to-End Test for Firefox on ${{ matrix.operating-system }} with PHP ${{ matrix.php-versions }} services: mysql: # https://qiita.com/sayama0402/items/e863ffb597ce87bf2e2f - image: mysql:5.7 + image: mysql:8.0 ports: - 3306:3306 env: @@ -27,7 +27,7 @@ jobs: options: --health-cmd "mysqladmin ping -h localhost" --health-interval 20s --health-timeout 10s --health-retries 10 postgres: - image: postgres:12 + image: postgres:16 ports: - 5432:5432 env: @@ -39,7 +39,7 @@ jobs: options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v4 # v4.1.1 + - uses: actions/checkout@v4 - name: Install PHP uses: shivammathur/setup-php@v2 with: @@ -105,4 +105,3 @@ jobs: - name: Starting End-to-End Tests with Firefox run: cd spec/run;npx wdio wdio-firefox.conf.js - diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 2ffacbcc0..f8767f331 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -12,9 +12,9 @@ jobs: runs-on: ${{ matrix.operating-system }} strategy: matrix: - operating-system: [ ubuntu-latest ] + operating-system: [ 'ubuntu-latest' ] # operating-system: [ubuntu-latest, macos-latest, windows-latest] - php-versions: [ '8.1','8.2','8.3','nightly' ] + php-versions: [ '8.1', '8.2', '8.3', '8.4', 'nightly' ] name: Unit Test on ${{ matrix.operating-system }} with PHP ${{ matrix.php-versions }} services: mysql: # https://qiita.com/sayama0402/items/e863ffb597ce87bf2e2f From 2d7bfb97b8ad9e4a32e4a7f76fdd3b68baa4e43e Mon Sep 17 00:00:00 2001 From: Atsushi Matsuo Date: Sat, 20 Jul 2024 21:30:53 +0900 Subject: [PATCH 2/2] Run phpcs-security-audit on CI --- .github/workflows/phpcs-security-audit.yml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/phpcs-security-audit.yml diff --git a/.github/workflows/phpcs-security-audit.yml b/.github/workflows/phpcs-security-audit.yml new file mode 100644 index 000000000..7236dbf37 --- /dev/null +++ b/.github/workflows/phpcs-security-audit.yml @@ -0,0 +1,32 @@ +name: phpcs-security-audit + +on: + push: + branches: + - "*" + pull_request: + branches: [ 'master', 'main' ] + +jobs: + run: + name: phpcs-security-audit + runs-on: 'ubuntu-latest' + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1 + with: + php-version: '8.3' + + - name: Install phpcs-security-audit + run: | + composer require --dev pheromone/phpcs-security-audit + composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true + composer require --dev dealerdirect/phpcodesniffer-composer-installer:"^1.0" + + - name: Run phpcs + continue-on-error: true + run: | + ./vendor/bin/phpcs --extensions=php,inc,lib,module,info --standard=./vendor/pheromone/phpcs-security-audit/example_base_ruleset.xml --warning-severity=6 src + exit 0