Skip to content

chore: overhaul version matrix #703

chore: overhaul version matrix

chore: overhaul version matrix #703

Workflow file for this run

name: 'CI'
on:
push:
branches: [master]
pull_request: ~
workflow_dispatch: ~
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- name: install dependencies
run: make install
- name: lint
run: make lint
run-tests:
runs-on: ubuntu-20.04
strategy:
matrix:
phpversion: ['7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v3
- name: set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.phpversion }}
coverage: xdebug
- name: get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.phpversion }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.phpversion }}-composer-
- name: install dependencies
run: make install
- name: test with phpunit on ${{ matrix.phpversion }}
run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 make coverage
- name: Coveralls
if: github.ref == 'refs/heads/master'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
docs:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- name: Install Dependencies
run: make install
- name: Generate Docs
run: make docs
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs