Skip to content

Commit

Permalink
chore: adds GHA.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs committed Jan 27, 2022
1 parent 40efc0c commit f6d128b
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 29 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build
on:
push:
branches:
- master
paths-ignore:
- "**/*.md"
- "LICENSE"
pull_request:
jobs:
test:
name: OpenTracing (PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run lint
if: matrix.operating-system != 'windows-latest'
run: composer lint
- name: Run static check
run: composer static-check
- name: Run tests
run: composer test
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .travis/php.ini

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenTracing API for PHP

[![Build Status](https://travis-ci.org/opentracing/opentracing-php.svg?branch=master)](https://travis-ci.org/opentracing/opentracing-php)
[![Build](https://github.com/opentracing/opentracing-php/actions/workflows/ci.yml/badge.svg)](https://github.com/opentracing/opentracing-php/actions/workflows/ci.yml)
[![OpenTracing Badge](https://img.shields.io/badge/OpenTracing-enabled-blue.svg)](http://opentracing.io)
[![Total Downloads](https://poser.pugx.org/opentracing/opentracing/downloads)](https://packagist.org/packages/opentracing/opentracing)
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg)](https://php.net/)
Expand Down

0 comments on commit f6d128b

Please sign in to comment.