Skip to content

Feat: do not override default headers when fire a json-type request #40

Feat: do not override default headers when fire a json-type request

Feat: do not override default headers when fire a json-type request #40

Workflow file for this run

name: php
on:
pull_request:
jobs:
phptests:
runs-on: ${{ matrix.operating-system }}
environment: OCR
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['8.1', '8.2', '8.3', '8.4']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2
extensions: gd
coverage: none
- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
- name: PHP Unit Test
run: vendor/bin/phpunit
env:
BAIDU_ACCESS_KEY: ${{ secrets.BAIDU_ACCESS_KEY }}
BAIDU_SECRET_KEY: ${{ secrets.BAIDU_SECRET_KEY }}
ALIYUN_APPCODE: ${{ secrets.ALIYUN_APPCODE }}
TENCENT_SECRET_ID: ${{ secrets.TENCENT_SECRET_ID }}
TENCENT_SECRET_KEY: ${{ secrets.TENCENT_SECRET_KEY }}
code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
environment: OCR
strategy:
fail-fast: false
matrix:
php-version:
- 8.1
dependencies:
- highest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
extensions: gd
tools: composer:v2
- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
- name: Coding Guidelines
run: vendor/bin/pint --test --config ./pint.json
- name: Collect code coverage with phpunit
run: vendor/bin/phpunit --coverage-clover=coverage.xml
env:
BAIDU_ACCESS_KEY: ${{ secrets.BAIDU_ACCESS_KEY }}
BAIDU_SECRET_KEY: ${{ secrets.BAIDU_SECRET_KEY }}
ALIYUN_APPCODE: ${{ secrets.ALIYUN_APPCODE }}
TENCENT_SECRET_ID: ${{ secrets.TENCENT_SECRET_ID }}
TENCENT_SECRET_KEY: ${{ secrets.TENCENT_SECRET_KEY }}
- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml