8000 minor #38620 CI for macOS (derrabus) · symfony/symfony@9603e56 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9603e56

Browse files
minor #38620 CI for macOS (derrabus)
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- CI for macOS | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #38586 | License | MIT | Doc PR | N/A This PR adds a GitHub Actions workflow that executes our test suite on macOS Catalina. Some tests are red here. I'm opening this PR as draft, so we can have a look at the failing tests and investigate. The current setup runs the test suite on php 7.4. We could technically add a matrix setup for different php versions, but I don't expect new insights from that. Compatibility with older php releases is covered by our Travis jobs. For me, macOS is mainly a developer OS and I expect those machines to be rather up to date. Both, php and macOS do yearly releases around the same time. It might be a good idea to generally follow them after ca. three months. This PR starts with php 8.0 on Catalina. We can switch to Big Sur as soon as GitHub provides a stable environment for it. Commits ------- d39c07e CI for macOS
2 parents 0690a6c + d39c07e commit 9603e56

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

.github/workflows/unit-tests.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ jobs:
1212

1313
tests:
1414
name: Tests
15-
runs-on: Ubuntu-20.04
1615

1716
env:
1817
extensions: amqp,apcu,igbinary,intl,mbstring,memcached,redis-5.3.4
@@ -21,15 +20,24 @@ jobs:
2120
matrix:
2221
include:
2322
- php: '7.2'
23+
os: ubuntu-20.04
2424
- php: '7.4'
25+
os: ubuntu-20.04
26+
- php: '8.0'
27+
os: macos-11
2528
- php: '8.0'
2629
mode: high-deps
30+
os: ubuntu-20.04
2731
- php: '8.1'
2832
mode: low-deps
33+
os: ubuntu-20.04
2934
- php: '8.2'
3035
mode: experimental
36+
os: ubuntu-20.04
3137
fail-fast: false
3238

39+
runs-on: "${{ matrix.os }}"
40+
3341
steps:
3442
- name: Checkout
3543
uses: actions/checkout@v2
@@ -50,6 +58,11 @@ jobs:
5058
extensions: "${{ env.extensions }}"
5159
tools: flex
5260

61+
- name: Install Homebrew packages
62+
if: "matrix.os == 'macos-11'"
63+
run: |
64+
brew install parallel
65+
5366
- name: Configure environment
5467
run: |
5568
git config --global user.email ""
@@ -61,11 +74,11 @@ jobs:
6174
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
6275
6376
echo COLUMNS=120 >> $GITHUB_ENV
64-
echo PHPUNIT="$(readlink -f ./phpunit) --exclude-group tty,benchmark,intl-data" >> $GITHUB_ENV
77+
echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data" >> $GITHUB_ENV
6578
echo COMPOSER_UP='composer update --no-progress --ansi' >> $GITHUB_ENV
6679
6780
SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V)
68-
SYMFONY_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | grep -P -o '[0-9]+\.[0-9]+')
81+
SYMFONY_VERSION=$(grep ' VERSION = ' src/Symfony/Component/HttpKernel/Kernel.php | cut -d "'" -f2 | cut -d '.' -f 1-2)
6982
SYMFONY_FEATURE_BRANCH=$(curl -s https://raw.githubusercontent.com/symfony/recipes/flex/main/index.json | jq -r '.versions."dev-name"')
7083
7184
# Install the phpunit-bridge from a PR if required
@@ -111,9 +124,9 @@ jobs:
111124
112125
# Skip the phpunit-bridge on bugfix-branches when not in *-deps mode
113126
if [[ ! "${{ matrix.mode }}" = *-deps && $SYMFONY_VERSION != $SYMFONY_FEATURE_BRANCH ]]; then
114-
echo COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h ') >> $GITHUB_ENV
127+
echo COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' | xargs -I{} dirname {}) >> $GITHUB_ENV
115128
else
116-
echo COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -printf '%h ') >> $GITHUB_ENV
129+
echo COMPONENTS=$(find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist | xargs -I{} dirname {}) >> $GITHUB_ENV
117130
fi
118131
119132
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
@@ -135,7 +148,7 @@ jobs:
135148
echo "::endgroup::"
136149
137150
- name: Patch return types
138-
if: "matrix.php == '8.1' && ! matrix.mode"
151+
if: "matrix.php == '8.1' && ! matrix.mode && matrix.os == 'ubuntu-20.04'"
139152
run: |
140153
sed -i 's/"\*\*\/Tests\/"//' composer.json
141154
composer install -q --optimize-autoloader

0 commit comments

Comments
 (0)
0