Skip to content

Commit

Permalink
add php unit test on push
Browse files Browse the repository at this point in the history
  • Loading branch information
vyskoczilova committed Jan 5, 2024
1 parent aa8c532 commit 312617e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@
/package.json
/gulpfile.js
.DS_Store
phpunit.cache
phpunit.cache
/tests
DOCKER_ENV
docker_tag
output.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test plugin build.
name: Create build
on:
workflow_dispatch:
jobs:
Expand All @@ -24,15 +24,17 @@ jobs:
- run: composer global require wpify/scoper
- run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE/vendor
- run: composer install --no-dev --optimize-autoloader
# - run: ls -R vendor
# - run: ls -R deps

- name: Archive plugin artifacts
uses: actions/upload-artifact@v2
with:
name: plugin-build
name: woolab-ic-dic
path: |
${{ github.workspace }}
!git/**/*
!github/**/*
!tests/**/*
!DOCKER_ENV
!docker_tag
!output.log
18 changes: 18 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI

on: [push]

jobs:
build-test:
runs-on: ubuntu-latest

## todo later - run deploy.

steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6 # or alternative dependency management
- uses: php-actions/phpunit@v3
with:
version: 7.5.20
bootstrap: tests/bootstrap.php
configuration: phpunit.xml

0 comments on commit 312617e

Please sign in to comment.