diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index e7ee3c98db..0092f62a1f 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -194,22 +194,23 @@ jobs: env: METADATA: ${{ steps.build.outputs.metadata }} VARIANT: ${{ matrix.variant }} - - name: Upload builder metadata - if: fromJson(needs.prepare.outputs.push) - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: metadata-builder-${{ matrix.variant }}-${{ steps.prepare.outputs.sanitized_platform }} - path: /tmp/metadata/builder/* - if-no-files-found: error - retention-days: 1 - - name: Upload runner metadata - if: fromJson(needs.prepare.outputs.push) - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - with: - name: metadata-runner-${{ matrix.variant }}-${{ steps.prepare.outputs.sanitized_platform }} - path: /tmp/metadata/runner/* - if-no-files-found: error - retention-days: 1 + - parallel: + - name: Upload builder metadata + if: fromJson(needs.prepare.outputs.push) + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: metadata-builder-${{ matrix.variant }}-${{ steps.prepare.outputs.sanitized_platform }} + path: /tmp/metadata/builder/* + if-no-files-found: error + retention-days: 1 + - name: Upload runner metadata + if: fromJson(needs.prepare.outputs.push) + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: metadata-runner-${{ matrix.variant }}-${{ steps.prepare.outputs.sanitized_platform }} + path: /tmp/metadata/runner/* + if-no-files-found: error + retention-days: 1 - name: Run tests if: ${{ !fromJson(needs.prepare.outputs.push) }} run: | diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index d49ac91fe0..15f6d4efa3 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -35,6 +35,8 @@ jobs: VALIDATE_JSCPD: false VALIDATE_GO: false VALIDATE_GO_MODULES: false + # re-enable once actionlint supports the "parallel" step key: https://github.com/rhysd/actionlint/issues/693 + VALIDATE_GITHUB_ACTIONS: false VALIDATE_PHP_PHPCS: false VALIDATE_PHP_PHPSTAN: false VALIDATE_PHP_PSALM: false diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8b0759f7a6..ef517556ca 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -86,13 +86,14 @@ jobs: with: version: latest working-directory: caddy/ - - name: Ensure go.mod is tidy - if: matrix.php-versions == '8.5' - run: go mod tidy -diff - - name: Ensure caddy/go.mod is tidy - if: matrix.php-versions == '8.5' - run: go mod tidy -diff - working-directory: caddy/ + - parallel: + - name: Ensure go.mod is tidy + if: matrix.php-versions == '8.5' + run: go mod tidy -diff + - name: Ensure caddy/go.mod is tidy + if: matrix.php-versions == '8.5' + run: go mod tidy -diff + working-directory: caddy/ integration-tests: name: Integration Tests (Linux, PHP ${{ matrix.php-versions }}) runs-on: ubuntu-latest diff --git a/.github/workflows/windows.yaml b/.github/workflows/windows.yaml index fd238306ca..91efd465e4 100644 --- a/.github/workflows/windows.yaml +++ b/.github/workflows/windows.yaml @@ -82,48 +82,49 @@ jobs: with: working-directory: frankenphp - - name: Install Vcpkg Libraries - working-directory: frankenphp - run: "vcpkg install" + - parallel: + - name: Install Vcpkg Libraries + working-directory: frankenphp + run: "vcpkg install" - - name: Download Watcher - run: | - $latestTag = gh release list --repo e-dant/watcher --limit 1 --exclude-drafts --exclude-pre-releases --json tagName --jq '.[0].tagName' - Write-Host "Latest Watcher version: $latestTag" + - name: Download Watcher + run: | + $latestTag = gh release list --repo e-dant/watcher --limit 1 --exclude-drafts --exclude-pre-releases --json tagName --jq '.[0].tagName' + Write-Host "Latest Watcher version: $latestTag" - gh release download $latestTag --repo e-dant/watcher --pattern "*x86_64-pc-windows-msvc.tar" -O watcher.tar + gh release download $latestTag --repo e-dant/watcher --pattern "*x86_64-pc-windows-msvc.tar" -O watcher.tar - tar -xf "watcher.tar" -C "$env:GITHUB_WORKSPACE" - Rename-Item -Path "$env:GITHUB_WORKSPACE\x86_64-pc-windows-msvc" -NewName "watcher" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tar -xf "watcher.tar" -C "$env:GITHUB_WORKSPACE" + Rename-Item -Path "$env:GITHUB_WORKSPACE\x86_64-pc-windows-msvc" -NewName "watcher" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Download PHP - run: | - $webContent = Invoke-WebRequest -Uri $env:PHP_DOWNLOAD_BASE - $links = $webContent.Links.Href | Where-Object { $_ -match "php-\d+\.\d+\.\d+-Win32-vs17-x64\.zip$" } + - name: Download PHP + run: | + $webContent = Invoke-WebRequest -Uri $env:PHP_DOWNLOAD_BASE + $links = $webContent.Links.Href | Where-Object { $_ -match "php-\d+\.\d+\.\d+-Win32-vs17-x64\.zip$" } - if (-not $links) { throw "Could not find PHP zip files at $env:PHP_DOWNLOAD_BASE" } + if (-not $links) { throw "Could not find PHP zip files at $env:PHP_DOWNLOAD_BASE" } - $latestFile = $links | Sort-Object { if ($_ -match '(\d+\.\d+\.\d+)') { [version]$matches[1] } } | Select-Object -Last 1 + $latestFile = $links | Sort-Object { if ($_ -match '(\d+\.\d+\.\d+)') { [version]$matches[1] } } | Select-Object -Last 1 - $version = if ($latestFile -match '(\d+\.\d+\.\d+)') { $matches[1] } - Write-Host "Detected latest PHP version: $version" + $version = if ($latestFile -match '(\d+\.\d+\.\d+)') { $matches[1] } + Write-Host "Detected latest PHP version: $version" - "PHP_VERSION=$version" >> $env:GITHUB_ENV + "PHP_VERSION=$version" >> $env:GITHUB_ENV - $phpZip = "php-$version-Win32-vs17-x64.zip" - $develZip = "php-devel-pack-$version-Win32-vs17-x64.zip" + $phpZip = "php-$version-Win32-vs17-x64.zip" + $develZip = "php-devel-pack-$version-Win32-vs17-x64.zip" - $dirName = "frankenphp-windows-x86_64" + $dirName = "frankenphp-windows-x86_64" - "DIR_NAME=$dirName" >> $env:GITHUB_ENV + "DIR_NAME=$dirName" >> $env:GITHUB_ENV - Invoke-WebRequest -Uri "$env:PHP_DOWNLOAD_BASE/$phpZip" -OutFile "$env:TEMP\php.zip" - Expand-Archive -Path "$env:TEMP\php.zip" -DestinationPath "$env:GITHUB_WORKSPACE\$dirName" + Invoke-WebRequest -Uri "$env:PHP_DOWNLOAD_BASE/$phpZip" -OutFile "$env:TEMP\php.zip" + Expand-Archive -Path "$env:TEMP\php.zip" -DestinationPath "$env:GITHUB_WORKSPACE\$dirName" - Invoke-WebRequest -Uri "$env:PHP_DOWNLOAD_BASE/$develZip" -OutFile "$env:TEMP\php-devel.zip" - Expand-Archive -Path "$env:TEMP\php-devel.zip" -DestinationPath "$env:GITHUB_WORKSPACE\php-devel" + Invoke-WebRequest -Uri "$env:PHP_DOWNLOAD_BASE/$develZip" -OutFile "$env:TEMP\php-devel.zip" + Expand-Archive -Path "$env:TEMP\php-devel.zip" -DestinationPath "$env:GITHUB_WORKSPACE\php-devel" - name: Prepare env run: |