File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Unit Tests
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - main
8+
9+ # Cancels all previous workflow runs for pull requests that have not completed.
10+ concurrency :
11+ # The concurrency group contains the workflow name and the branch name for pull requests
12+ # or the commit hash for any other events.
13+ group : ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
14+ cancel-in-progress : true
15+
16+ jobs :
17+ unit-php :
18+ name : PHP
19+ runs-on : ubuntu-latest
20+ if : ${{ github.repository == 'BeAPI/multisite-shared-blocks' || github.event_name == 'pull_request' }}
21+
22+ steps :
23+ - name : Checkout project
24+ uses : actions/checkout@v3
25+
26+ - name : Setup NodeJS
27+ uses : actions/setup-node@v3
28+ with :
29+ node-version-file : ' .nvmrc'
30+ cache : npm
31+
32+ - name : Npm install and build
33+ run : |
34+ npm ci
35+ npm run build
36+
37+ - name : Install WordPress
38+ run : |
39+ npm run env:start
40+
41+ - name : Run unit tests
42+ run : npm run test:php
43+ if : ${{ success() || failure() }}
You can’t perform that action at this time.
0 commit comments