Skip to content

install svn if not installed yet during deployment #243

install svn if not installed yet during deployment

install svn if not installed yet during deployment #243

name: Lint Test Deploy
on: [push]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: |
npm ci
composer install
- name: Run linter
run: npm run lint
- name: Run PHP linter
run: |
npm run wp-env start
npm run lint:php:ci
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
wp: [ '6.2.6', '6.3.5', '6.4.5', '6.5.5', '6.6.2', '6.7.2', '6.8.1' ]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: |
npm ci
composer install
- name: Install Playwright dependencies
run: |
npx playwright install chromium firefox webkit --with-deps
- name: "Configure environment with WP ${{ matrix.wp }}"
run: |
echo -e '{\n\t"core": "WordPress/WordPress#${{ matrix.wp }}"\n}' > ./.wp-env.override.json
- name: Install WordPress
run: |
npm run wp-env start
- name: Running JavaScript E2E tests
run: npm run test:e2e
# TODO check why php unit tests don't work anymore
#- name: Running PHP unit tests
# run: npm run test:unit:php:ci
- uses: actions/upload-artifact@v4
if: always()
with:
name: "playwright-report-wp${{ matrix.wp }}"
path: artifacts/
retention-days: 7
deploy-dry-run:
name: '[DRY RUN] Deploy'
# only run on master but not tags
if: ${{ github.ref == 'refs/heads/master' && !startsWith(github.ref, 'refs/tags/') }}
needs: [ lint, tests ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- shell: bash
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
run: |
DRYRUN=true scripts/deploy-wp-plugin.sh
deploy:
name: Deploy
# only run on tags
if: startsWith(github.ref, 'refs/tags/')
needs: [ lint, tests ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- shell: bash
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
run: |
scripts/deploy-wp-plugin.sh