Skip to content

CI for macOS #38620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
CI for macOS
  • Loading branch information
derrabus authored and nicolas-grekas committed Dec 11, 2021
commit d39c07e859d3fcc2a06169ae32bd14e21d4729b3
25 changes: 19 additions & 6 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:

tests:
name: Tests
runs-on: Ubuntu-20.04

env:
extensions: amqp,apcu,igbinary,intl,mbstring,memcached,redis-5.3.4
Expand All @@ -21,15 +20,24 @@ jobs:
matrix:
include:
- php: '7.2'
os: ubuntu-20.04
- php: '7.4'
os: ubuntu-20.04
- php: '8.0'
os: macos-11
- php: '8.0'
mode: high-deps
os: ubuntu-20.04
- php: '8.1'
mode: low-deps
os: ubuntu-20.04
- php: '8.2'
mode: experimental
os: ubuntu-20.04
fail-fast: false

runs-on: "${{ matrix.os }}"

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -50,6 +58,11 @@ jobs:
extensions: "${{ env.extensions }}"
tools: flex

- name: Install Homebrew packages
if: "matrix.os == 'macos-11'"
run: |
brew install parallel

- name: Configure environment
run: |
git config --global user.email ""
Expand All @@ -61,11 +74,11 @@ jobs:
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"

echo COLUMNS=120 >> $GITHUB_ENV
echo PHPUNIT="$(readlink -f ./phpunit) --exclude-group tty,benchmark,intl-data" >> $GITHUB_ENV
echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data" >> $GITHUB_ENV
echo COMPOSER_UP='composer update --no-progress --ansi' >> $GITHUB_ENV

SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V)
SYMFONY_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -P -o '[0-9]+\.[0-9]+')
SYMFONY_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | cut -d "'" -f2 | cut -d '.' -f 1-2)
SYMFONY_FEATURE_BRANCH=$(curl -s https://raw.githubusercontent.com/symfony/recipes/flex/main/index.json | jq -r '.versions."dev-name"')

# Install the phpunit-bridge from a PR if required
Expand Down Expand Up @@ -111,9 +124,9 @@ jobs:

# Skip the phpunit-bridge on bugfix-branches when not in *-deps mode
if [[ ! "${{ matrix.mode }}" = *-deps && $SYMFONY_VERSION != $SYMFONY_FEATURE_BRANCH ]]; then
echo COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h ') >> $GITHUB_ENV
echo COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' | xargs -I{} dirname {}) >> $GITHUB_ENV
else
echo COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h ') >> $GITHUB_ENV
echo COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist | xargs -I{} dirname {}) >> $GITHUB_ENV
fi

# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
Expand All @@ -135,7 +148,7 @@ jobs:
echo "::endgroup::"

- name: Patch return types
if: "matrix.php == '8.1' && ! matrix.mode"
if: "matrix.php == '8.1' && ! matrix.mode && matrix.os == 'ubuntu-20.04'"
run: |
sed -i 's/"\*\*\/Tests\/"//' composer.json
composer install -q --optimize-autoloader
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy