Skip to content

Commit 3af6d8d

Browse files
committed
Add CI for macOS.
1 parent a4ed043 commit 3af6d8d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/tests.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,42 @@ jobs:
9696
docker run --rm -e COMPOSER_ROOT_VERSION -v $(pwd):/app -v $(which composer):/usr/local/bin/composer -v /usr/local/bin/vulcain:/usr/local/bin/vulcain -w /app php:7.4-alpine ./phpunit src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php --filter testHttp2Push
9797
sudo rm -rf .phpunit
9898
[ -d .phpunit.bak ] && mv .phpunit.bak .phpunit
99+
100+
macOS:
101+
name: PHPUnit on macOS
102+
runs-on: macos-10.15
103+
104+
steps:
105+
- name: Checkout
106+
uses: actions/checkout@v2
107+
108+
- name: Setup PHP
109+
uses: shivammathur/setup-php@v2
110+
with:
111+
coverage: 'none'
112+
extensions: 'apcu'
113+
ini-values: 'memory_limit=-1'
114+
php-version: '7.4'
115+
tools: flex
116+
117+
- name: Setup Vulcain
118+
run: |
119+
curl https://github.com/dunglas/vulcain/releases/download/v0.2.1/vulcain_0.2.1_Darwin_x86_64.tar.gz -Lso /tmp/vulcain.tar.gz
120+
tar -xzf /tmp/vulcain.tar.gz -C /usr/local/bin vulcain
121+
rm /tmp/vulcain.tar.gz
122+
123+
- name: Configure composer
124+
run: |
125+
([ -d ~/.composer ] || mkdir ~/.composer) && cp .github/composer-config.json ~/.composer/config.json
126+
SYMFONY_VERSION=$(cat composer.json | grep '"branch-version":\s*"[0-9]*\.[0-9]*"' | grep -o '[0-9]*\.[0-9]*')
127+
echo "SYMFONY_VERSION=$SYMFONY_VERSION" >> $GITHUB_ENV
128+
echo "COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev" >> $GITHUB_ENV
129+
130+
- name: Install dependencies
131+
run: composer update --no-progress --ansi
132+
133+
- name: Install PHPUnit
134+
run: ./phpunit --install
135+
136+
- name: Run tests
137+
run: find src/Symfony -mindepth 2 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -print0 | xargs -0 -n1 dirname | sort | parallel ./phpunit --colors=always --exclude-group tty,benchmark,intl-data

0 commit comments

Comments
 (0)