ソースを参照

:octocat: CI update

smiley 2 年 前
コミット
d5da0e6823
1 ファイル変更15 行追加8 行削除
  1. 15 8
      .github/workflows/tests.yml

+ 15 - 8
.github/workflows/tests.yml

@@ -18,6 +18,15 @@ jobs:
 
 
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
 
 
+    strategy:
+      fail-fast: true
+      matrix:
+        php-version:
+          - "7.4"
+          - "8.0"
+          - "8.1"
+          - "8.2"
+
     env:
     env:
       PHAN_ALLOW_XDEBUG: 0
       PHAN_ALLOW_XDEBUG: 0
       PHAN_DISABLE_XDEBUG_WARN: 1
       PHAN_DISABLE_XDEBUG_WARN: 1
@@ -29,20 +38,22 @@ jobs:
       - name: "Install PHP"
       - name: "Install PHP"
         uses: shivammathur/setup-php@v2
         uses: shivammathur/setup-php@v2
         with:
         with:
-          php-version: "7.4"
+          php-version: ${{ matrix.php-version }}
           coverage: none
           coverage: none
           tools: pecl
           tools: pecl
           extensions: ast, gd, imagick, json, mbstring
           extensions: ast, gd, imagick, json, mbstring
 
 
       - name: "Update dependencies with composer"
       - name: "Update dependencies with composer"
-        run: composer update --no-interaction --no-ansi --no-progress --no-suggest
+        uses: ramsey/composer-install@v2
 
 
       - name: "Run phan"
       - name: "Run phan"
-        run: php vendor/bin/phan
+        run: php vendor/bin/phan --target-php-version=${{ matrix.php-version }}
 
 
   tests:
   tests:
     name: "Unit Tests"
     name: "Unit Tests"
 
 
+    needs: static-code-analysis
+
     runs-on: ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
 
 
     strategy:
     strategy:
@@ -58,10 +69,6 @@ jobs:
           - "8.2"
           - "8.2"
 
 
     steps:
     steps:
-#      - name: "Configure git to avoid issues with line endings"
-#        if: matrix.os == 'windows-latest'
-#        run: git config --global core.autocrlf false
-
       - name: "Checkout"
       - name: "Checkout"
         uses: actions/checkout@v3
         uses: actions/checkout@v3
 
 
@@ -74,7 +81,7 @@ jobs:
           extensions: gd, imagick, json, mbstring
           extensions: gd, imagick, json, mbstring
 
 
       - name: "Install dependencies with composer"
       - name: "Install dependencies with composer"
-        run: composer update --no-ansi --no-interaction --no-progress --no-suggest
+        uses: ramsey/composer-install@v2
 
 
       - name: "Run tests with phpunit"
       - name: "Run tests with phpunit"
         run: php vendor/bin/phpunit --configuration=phpunit.xml
         run: php vendor/bin/phpunit --configuration=phpunit.xml