Skip to content

Commit 1c35471

Browse files
committed
Add GitHub Action Workflows
1 parent b27c1b8 commit 1c35471

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/php.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# GitHub Action for PHP Plugins Google Spreadsheets by Bear
2+
name: Testing PHP Plugins Google Spreadsheets by Bear
3+
on: [ push, pull_request ]
4+
jobs:
5+
build:
6+
strategy:
7+
matrix:
8+
operating-system: [ ubuntu-latest, windows-latest, macos-latest ]
9+
php-versions: [ '5.6', '7.0', '8.0' ]
10+
runs-on: ${{ matrix.operating-system }}
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Setup PHP, with composer and extensions
15+
uses: shivammathur/setup-php@v2 # From https://github.com/shivammathur/setup-php
16+
with:
17+
php-version: ${{ matrix.php-versions }}
18+
extensions: mbstring, intl, curl, json, openssl, iconv
19+
coverage: xdebug #optional
20+
- name: Get composer cache directory
21+
id: composercache
22+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
23+
- name: Cache composer dependencies
24+
uses: actions/cache@v2
25+
with:
26+
path: ${{ steps.composercache.outputs.dir }}
27+
# Use composer.json for key, if composer.lock is not committed.
28+
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
29+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
30+
restore-keys: ${{ runner.os }}-composer-
31+
- name: Install dependencies
32+
run: composer install --no-progress --prefer-dist --optimize-autoloader

test/test.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
/**
3+
* Project spreadsheets-basic
4+
* Created by PhpStorm
5+
* User: 713uk13m <dev@nguyenanhung.com>
6+
* Copyright: 713uk13m <dev@nguyenanhung.com>
7+
* Date: 09/20/2021
8+
* Time: 06:02
9+
*/
10+
require_once __DIR__ . '/../vendor/autoload.php';
11+
12+
use nguyenanhung\Google\Basic\Spreadsheets\GoogleSpreadsheets;
13+
14+
$sheet = new GoogleSpreadsheets();
15+

0 commit comments

Comments
 (0)