Skip to content

chore: migrate travis ci to github actions #47

chore: migrate travis ci to github actions

chore: migrate travis ci to github actions #47

Workflow file for this run

name: Build
on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
push:
branches:
- master
- chore/*
- bug/*
- feat/*
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [7.3, 7.4, 8.0]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, pcov
coverage: pcov
- name: Validate composer.json and composer.lock
run: composer validate
- 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: Run Tests
run: ./sdktest.sh
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}