Skip to content

Commit 308af2f

Browse files
committed
add badge for GitHub Actions CI for macOS
- some unknown phpunit config issue causing error, otherwise test passes - unable to include ms sql-server, docker throws: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
1 parent 6881e33 commit 308af2f

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed

.github/workflows/ezsql-macos.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# GitHub Action for PHP with extensions
2+
name: macOS
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
windows:
14+
name: macOS (PHP ${{ matrix.php-versions }} CI)
15+
runs-on: macos-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
operating-system: [macos-latest]
20+
php-versions: ['7.3']
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
- name: Setup PHP, with composer and extensions
26+
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
27+
with:
28+
php-version: ${{ matrix.php-versions }}
29+
extensions: mbstring, fileinfo, mysqli, pdo_mysql, pgsql, pdo_pgsql, sqlite3, pdo_sqlite, xdebug
30+
coverage: xdebug
31+
- name: Brew Install MySQL
32+
run: |
33+
brew install [email protected]
34+
- name: Brew Start MySQL
35+
run: |
36+
brew services start [email protected]
37+
brew link [email protected] --force
38+
mysqld --initialize-insecure
39+
mysql.server start
40+
- name: Setup MySQL Database
41+
run: |
42+
mysql -u root -e "CREATE DATABASE IF NOT EXISTS ez_test;"
43+
mysql -u root -e "CREATE USER ez_test@localhost IDENTIFIED BY 'ezTest'; GRANT ALL ON ez_test.* TO ez_test@localhost; FLUSH PRIVILEGES;"
44+
- name: Brew Start PostgreSql
45+
run: |
46+
sudo mkdir /var/pgsql_socket/
47+
sudo ln -s /private/tmp/.s.PGSQL.5432 /var/pgsql_socket/
48+
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
49+
brew services restart postgresql
50+
- name: Setup PostgreSql Database
51+
run: |
52+
createuser -s postgres
53+
psql -U postgres --command="CREATE USER ez_test PASSWORD 'ezTest'" --command="\du"
54+
createdb --owner=ez_test ez_test
55+
- name: Install dependencies
56+
run: |
57+
composer self-update
58+
composer update
59+
- name: Test with phpunit
60+
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
61+
- name: Submit code coverage
62+
uses: codecov/codecov-action@v1
63+
with:
64+
file: ./coverage.xml # optional

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Windows](https://github.com/ezSQL/ezsql/workflows/Windows/badge.svg)](https://github.com/ezSQL/ezsql/actions?query=workflow%3AWindows)
44
[![Linux](https://github.com/ezSQL/ezsql/workflows/Linux/badge.svg)](https://github.com/ezSQL/ezsql/actions?query=workflow%3ALinux)
5+
[![macOS](https://github.com/ezSQL/ezsql/workflows/macOS/badge.svg)](https://github.com/ezSQL/ezsql/actions?query=workflow%3AmacOS)
56
[![codecov](https://codecov.io/gh/ezSQL/ezSQL/branch/master/graph/badge.svg)](https://codecov.io/gh/ezSQL/ezSQL)
67
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/aad1f6aaaaa14f60933e75615da900b8)](https://www.codacy.com/app/techno-express/ezsql?utm_source=github.com&utm_medium=referral&utm_content=ezSQL/ezsql&utm_campaign=Badge_Grade)
78
[![Maintainability](https://api.codeclimate.com/v1/badges/6f6107f25e9de7bf4272/maintainability)](https://codeclimate.com/github/ezSQL/ezsql/maintainability)

0 commit comments

Comments
 (0)