From 502a7241617b02cba9ab018dcfab7c5f5e02bb48 Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 30 Dec 2023 21:13:01 +0100 Subject: [PATCH] Adjust Github Actions --- .github/workflows/integration.yml | 47 ++++++++++++++++++---------- .github/workflows/psalm.yml | 7 ++--- .github/workflows/security-check.yml | 11 ++++--- 3 files changed, 39 insertions(+), 26 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e035f13f..1f7ca56d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -6,8 +6,6 @@ on: branches: - main -permissions: read-all - env: DATABASE_DRIVER: pdo_sqlite DATABASE_URL: sqlite:///%kernel.project_dir%/var/db_test.sqlite @@ -30,15 +28,18 @@ env: jobs: unit-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 name: PHPUnit strategy: fail-fast: false matrix: php-versions: ['7.4', '8.2'] steps: - - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@v2 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: openssl, sodium @@ -76,16 +77,20 @@ jobs: matrix: php-versions: ['7.4', '8.2'] steps: - - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@v2 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: openssl, sodium tools: composer - - uses: actions/setup-node@v4 + - name: Setup Node + uses: actions/setup-node@v4 with: - node-version: '16' + node-version: 'lts' - name: Get composer cache directory id: composer-cache @@ -124,16 +129,20 @@ jobs: --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@v2 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: php-version: '7.4' extensions: openssl, sodium, mysql tools: composer - - uses: actions/setup-node@v4 + - name: Setup Node + uses: actions/setup-node@v4 with: - node-version: '16' + node-version: 'lts' - name: Get composer cache directory id: composer-cache @@ -171,16 +180,20 @@ jobs: --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v4 - - uses: shivammathur/setup-php@v2 + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 with: php-version: '8.2' extensions: openssl, sodium, pgsql tools: composer - - uses: actions/setup-node@v4 + - name: Setup Node + uses: actions/setup-node@v4 with: - node-version: '16' + node-version: 'lts' - name: Get composer cache directory id: composer-cache diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index b45e72eb..27e18c3a 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -2,14 +2,12 @@ name: Psalm Static analysis on: [pull_request] -permissions: read-all - jobs: psalm: name: Psalm - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@v4 - name: Psalm @@ -17,6 +15,7 @@ jobs: with: security_analysis: true report_file: results.sarif + - name: Upload Security Analysis results to GitHub uses: github/codeql-action/upload-sarif@v3 with: diff --git a/.github/workflows/security-check.yml b/.github/workflows/security-check.yml index 63c7d69a..b4da36ed 100644 --- a/.github/workflows/security-check.yml +++ b/.github/workflows/security-check.yml @@ -6,12 +6,13 @@ on: schedule: - cron: '0 8 * * 1' -permissions: read-all - jobs: security-check: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 name: PHP Security Checker steps: - - uses: actions/checkout@v4 - - uses: symfonycorp/security-checker-action@v5 + - name: Checkout + uses: actions/checkout@v4 + + - name: Symfony Security Check + uses: symfonycorp/security-checker-action@v5