Support UTF-8 with BOM #119
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit test and Release | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- php: 8.2 | |
wp: 6.7 | |
- php: 8.1 | |
wp: 6.4 | |
- php: 7.4 | |
wp: 6.2 | |
name: Test on PHP ${{ matrix.php }} / WP ${{ matrix.wp }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '22' | |
- name: npm install | |
run: npm ci | |
- name: Build | |
run: | | |
bash ./bin/build.sh | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, intl #optional, setup extensions | |
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration | |
- name: Composer install | |
run: composer install --optimize-autoloader --prefer-dist | |
- name: Install WordPress | |
run: | | |
chmod -R 767 ./ # TODO: Possibly integrate in wp-env | |
WP_ENV_PHP_VERSION=${{ matrix.php }} WP_ENV_CORE=WordPress/WordPress#${{ matrix.wp }} npm run wp-env start | |
- name: Running lint check | |
run: npm run lint-php | |
- name: Running single site unit tests | |
run: npm run test-unit-php | |
if: ${{ success() || failure() }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [ test ] | |
steps: | |
- uses: actions/checkout@v3 | |
if: contains(github.ref, 'tags/') | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '22' | |
if: contains(github.ref, 'tags/') | |
- name: npm install | |
run: npm ci | |
if: contains(github.ref, 'tags/') | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.4 | |
extensions: mbstring, intl #optional, setup extensions | |
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration | |
coverage: xdebug #optional, setup coverage driver | |
if: contains(github.ref, 'tags/') | |
- name: Composer install | |
run: composer install --optimize-autoloader --prefer-dist --no-dev | |
if: contains(github.ref, 'tags/') | |
- name: Build | |
run: | | |
bash ./bin/build.sh | |
if: contains(github.ref, 'tags/') | |
- name: WordPress Plugin Deploy | |
if: contains(github.ref, 'tags/') | |
uses: 10up/action-wordpress-plugin-deploy@stable | |
env: | |
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} | |
SVN_USERNAME: ${{ secrets.SVN_USERNAME }} | |
SLUG: simple-csv-exporter |