Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate travis ci to github actions #274

Merged
merged 10 commits into from
Jan 25, 2024
41 changes: 27 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,52 @@
name: Build

on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- '**'
push:
branches:
- master
- chore/*
- bug/*
- feat/*
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [7.4]
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, pcov
key: cache-v1
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, pcov
coverage: pcov

coverage: pcov
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ hashFiles('**/composer.lock') }}
restore-keys: composer-
- name: Install dependencies
run: composer install --no-interaction --no-progress --prefer-dist

- name: Run PHPUnit tests
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
Expand Down
53 changes: 0 additions & 53 deletions .github/workflows/tests.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://semaphoreci.com/api/v1/continuum/transbank-sdk-php/branches/master/badge.svg)](https://semaphoreci.com/continuum/transbank-sdk-php)
![Build Status](https://github.com/TransbankDevelopers/transbank-sdk-php/actions/workflows/build.yml/badge.svg?branch=master)
[![Latest Stable Version](https://poser.pugx.org/transbank/transbank-sdk/v/stable)](https://packagist.org/packages/transbank/transbank-sdk)

# Transbank PHP SDK
Expand Down
Loading