From 054b894b68e37c16fd4fa217317e3df2d580fe5e Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 2 Jun 2026 09:41:53 +0000 Subject: [PATCH] ci: pin GitHub Actions macOS runners to macos-15 Co-authored-by: Michi Hoffmann --- .github/workflows/build.yml | 222 ++++++++++++++++++------------------ 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a83d46d..249606d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,111 +1,111 @@ -name: Build and Test - -on: - push: - branches: - - 'main' - - 'release/**' - pull_request: - paths-ignore: - - '**.md' - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Setup dependencies - uses: ./.github/actions/setup-dependencies - - - name: Create module archive - run: Compress-Archive -Path modules/Sentry/* -DestinationPath modules/Sentry.zip - shell: pwsh - - - name: Upload release artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ github.sha }} - path: modules/*.zip - - test: - name: ${{ matrix.os }} - ${{ matrix.shell }} ${{ matrix.version }} - runs-on: ${{ matrix.os == 'ubuntu' && 'ubuntu-latest' || matrix.os == 'macos' && 'macos-latest' || matrix.os == 'windows' && 'windows-latest' || matrix.os }} - needs: build - - strategy: - fail-fast: false - matrix: - os: [ubuntu] - shell: [pwsh] - version: - - 'latest' - - '7.6' - - '7.5' - - '7.4' - # Test builtin `pwsh` version on all `*-latest` os images and Windows Powershell on Windows 2022 and 2025. - include: - - os: ubuntu - shell: pwsh - - os: macos - shell: pwsh - - os: windows - shell: pwsh - - os: windows-2022 - shell: powershell - - os: windows-2025 - shell: powershell - - defaults: - run: - shell: ${{ matrix.shell }} - - steps: - - uses: actions/checkout@v4 - - - name: Download release artifact - uses: actions/download-artifact@v4 - with: - name: ${{ github.sha }} - - - name: Extract module archives - run: | - Remove-Item -Recurse -Force modules/Sentry - Expand-Archive -Path Sentry.zip -DestinationPath modules/Sentry - - - name: Set POWERSHELL_VERSION env var - if: ${{ matrix.version != '' }} - run: | - $config = Get-Content ./tests/test-pwsh-${{matrix.version}}.props | ConvertFrom-StringData - $version = $config.version -replace '^v','' - "POWERSHELL_VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Setup PowerShell ${{ env.POWERSHELL_VERSION }} - if: ${{ matrix.version != '' }} - uses: ./.github/actions/setup-powershell - - - run: $PSVersionTable - - # We don't test module loading with Pester because we're unable to unload the module between tests. - # Testing as a separate step allows unloads it automatically at the step end. - - name: Module loading - run: | - . ./scripts/settings.ps1 - # Loading the first time - Get-Item ./modules/Sentry/Sentry.psd1 | Import-Module -PassThru - # This needs to return actual types (method overloads) - [Sentry.SentrySdk]::init - # Loading the second time must be possible, without errors - Get-Item ./modules/Sentry/Sentry.psd1 | Import-Module - # And accessing APIs must still work too - [Sentry.SentrySdk]::init - - - name: Unit tests - run: | - . ./scripts/settings.ps1 - Get-Item ./modules/Sentry/Sentry.psd1 | Import-Module - $config = New-PesterConfiguration - $config.Run.Path = "tests" - $config.TestResult.Enabled = $true - Invoke-Pester -Configuration $config +name: Build and Test + +on: + push: + branches: + - 'main' + - 'release/**' + pull_request: + paths-ignore: + - '**.md' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup dependencies + uses: ./.github/actions/setup-dependencies + + - name: Create module archive + run: Compress-Archive -Path modules/Sentry/* -DestinationPath modules/Sentry.zip + shell: pwsh + + - name: Upload release artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ github.sha }} + path: modules/*.zip + + test: + name: ${{ matrix.os }} - ${{ matrix.shell }} ${{ matrix.version }} + runs-on: ${{ matrix.os == 'ubuntu' && 'ubuntu-latest' || matrix.os == 'macos' && 'macos-15' || matrix.os == 'windows' && 'windows-latest' || matrix.os }} + needs: build + + strategy: + fail-fast: false + matrix: + os: [ubuntu] + shell: [pwsh] + version: + - 'latest' + - '7.6' + - '7.5' + - '7.4' + # Test builtin `pwsh` version on all `*-latest` os images and Windows Powershell on Windows 2022 and 2025. + include: + - os: ubuntu + shell: pwsh + - os: macos + shell: pwsh + - os: windows + shell: pwsh + - os: windows-2022 + shell: powershell + - os: windows-2025 + shell: powershell + + defaults: + run: + shell: ${{ matrix.shell }} + + steps: + - uses: actions/checkout@v4 + + - name: Download release artifact + uses: actions/download-artifact@v4 + with: + name: ${{ github.sha }} + + - name: Extract module archives + run: | + Remove-Item -Recurse -Force modules/Sentry + Expand-Archive -Path Sentry.zip -DestinationPath modules/Sentry + + - name: Set POWERSHELL_VERSION env var + if: ${{ matrix.version != '' }} + run: | + $config = Get-Content ./tests/test-pwsh-${{matrix.version}}.props | ConvertFrom-StringData + $version = $config.version -replace '^v','' + "POWERSHELL_VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Setup PowerShell ${{ env.POWERSHELL_VERSION }} + if: ${{ matrix.version != '' }} + uses: ./.github/actions/setup-powershell + + - run: $PSVersionTable + + # We don't test module loading with Pester because we're unable to unload the module between tests. + # Testing as a separate step allows unloads it automatically at the step end. + - name: Module loading + run: | + . ./scripts/settings.ps1 + # Loading the first time + Get-Item ./modules/Sentry/Sentry.psd1 | Import-Module -PassThru + # This needs to return actual types (method overloads) + [Sentry.SentrySdk]::init + # Loading the second time must be possible, without errors + Get-Item ./modules/Sentry/Sentry.psd1 | Import-Module + # And accessing APIs must still work too + [Sentry.SentrySdk]::init + + - name: Unit tests + run: | + . ./scripts/settings.ps1 + Get-Item ./modules/Sentry/Sentry.psd1 | Import-Module + $config = New-PesterConfiguration + $config.Run.Path = "tests" + $config.TestResult.Enabled = $true + Invoke-Pester -Configuration $config