Skip to content

2.0.0

2.0.0 #3

name: CI
on:
push:
branches:
- master
- dev
tags:
- 1.*
- 2.*
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
phpcs:
strategy:
matrix:
version: ['8.1', '8.2', '8.3']
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
tools: composer:v2
- name: Install composer packages
run: |
php -v
composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
- name: Execute PHP_CodeSniffer
run: |
php -v
composer phpcs
phpunit:
strategy:
matrix:
version: ['8.1', '8.2', '8.3']
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.version }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, exif, iconv
coverage: xdebug
- name: Install composer packages
run: |
php -v
composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
- name: Execute tests
run: |
php -v
./vendor/phpunit/phpunit/phpunit --version
./vendor/phpunit/phpunit/phpunit --coverage-clover=coverage.xml
export CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }}
bash <(curl -s https://codecov.io/bash) || echo 'Codecov failed to upload'
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: clnt/get-address-io