Skip to content

Commit

Permalink
Switch to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ben221199 committed Jun 5, 2024
1 parent 63c0d34 commit ef26cfa
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 11 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: PHP Composer

on:
push:
pull_request:

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
env:
XDEBUG_MODE: coverage
run: composer run-script test

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ This yocLibrary enables your project to encode and decode Multibases in PHP.

## Status

[![Build Status](https://travis-ci.com/yocto/yoclib-multibase-php.svg?branch=master)](https://travis-ci.com/yocto/yoclib-multibase-php)
[![PHP Composer](https://github.com/yocto/yoclib-multibase-php/actions/workflows/php.yml/badge.svg)](https://github.com/yocto/yoclib-multibase-php/actions/workflows/php.yml)
[![codecov](https://codecov.io/gh/yocto/yoclib-multibase-php/graph/badge.svg?token=CVJJGTZJ1X)](https://codecov.io/gh/yocto/yoclib-multibase-php)

## Installation

Expand Down
21 changes: 21 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
bootstrap="vendor/autoload.php"
cacheResult="false"
failOnRisky="true"
failOnWarning="true"
verbose="true">

<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>

<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>

</phpunit>

0 comments on commit ef26cfa

Please sign in to comment.