Skip to content

Commit cf61008

Browse files
committed
Merge branch 'develop'
2 parents 0f0d0db + 0719655 commit cf61008

33 files changed

+1117
-247
lines changed

.github/workflows/phpstan.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: 'PHPStan Static Analysis'
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
phpstan:
11+
name: PHPStan
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 1
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: '7.4'
24+
coverage: none
25+
tools: composer:v2
26+
27+
- name: Get Composer Cache Directory
28+
id: composer-cache
29+
run: |
30+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
31+
32+
- name: Cache Composer dependencies
33+
uses: actions/cache@v4
34+
with:
35+
path: ${{ steps.composer-cache.outputs.dir }}
36+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-composer-
39+
40+
- name: Install dependencies
41+
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
42+
43+
- name: Run PHPStan
44+
run: composer phpstan

.github/workflows/tests-php.yml

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,65 +9,65 @@ jobs:
99
- unit
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout the repository
13-
uses: actions/checkout@v2
14-
with:
15-
fetch-depth: 1000
16-
submodules: recursive
12+
- name: Checkout the repository
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 1000
16+
submodules: recursive
1717
# ------------------------------------------------------------------------------
1818
# Checkout slic
1919
# ------------------------------------------------------------------------------
20-
- name: Checkout slic
21-
uses: actions/checkout@v2
22-
with:
23-
repository: stellarwp/slic
24-
ref: main
25-
path: slic
26-
fetch-depth: 1
20+
- name: Checkout slic
21+
uses: actions/checkout@v4
22+
with:
23+
repository: stellarwp/slic
24+
ref: main
25+
path: slic
26+
fetch-depth: 1
2727
# ------------------------------------------------------------------------------
2828
# Prepare our composer cache directory
2929
# ------------------------------------------------------------------------------
30-
- name: Get Composer Cache Directory
31-
id: get-composer-cache-dir
32-
run: |
33-
echo "::set-output name=dir::$(composer config cache-files-dir)"
34-
- uses: actions/cache@v2
35-
id: composer-cache
36-
with:
37-
path: ${{ steps.get-composer-cache-dir.outputs.dir }}
38-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
39-
restore-keys: |
40-
${{ runner.os }}-composer-
30+
- name: Get Composer Cache Directory
31+
id: get-composer-cache-dir
32+
run: |
33+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
34+
- uses: actions/cache@v4
35+
id: composer-cache
36+
with:
37+
path: ${{ steps.get-composer-cache-dir.outputs.dir }}
38+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
39+
restore-keys: |
40+
${{ runner.os }}-composer-
4141
# ------------------------------------------------------------------------------
4242
# Initialize slic
4343
# ------------------------------------------------------------------------------
44-
- name: Set up slic env vars
45-
run: |
46-
echo "SLIC_BIN=${GITHUB_WORKSPACE}/slic/slic" >> $GITHUB_ENV
47-
echo "SLIC_WP_DIR=${GITHUB_WORKSPACE}/slic/_wordpress" >> $GITHUB_ENV
48-
echo "SLIC_WORDPRESS_DOCKERFILE=Dockerfile.base" >> $GITHUB_ENV
49-
- name: Set run context for slic
50-
run: echo "SLIC=1" >> $GITHUB_ENV && echo "CI=1" >> $GITHUB_ENV
51-
- name: Start ssh-agent
52-
run: |
53-
mkdir -p "${HOME}/.ssh";
54-
ssh-agent -a /tmp/ssh_agent.sock;
55-
- name: Export SSH_AUTH_SOCK env var
56-
run: echo "SSH_AUTH_SOCK=/tmp/ssh_agent.sock" >> $GITHUB_ENV
57-
- name: Set up slic for CI
58-
run: |
59-
cd ${GITHUB_WORKSPACE}/..
60-
${SLIC_BIN} here
61-
${SLIC_BIN} interactive off
62-
${SLIC_BIN} build-prompt off
63-
${SLIC_BIN} build-subdir off
64-
${SLIC_BIN} xdebug off
65-
${SLIC_BIN} debug on
66-
${SLIC_BIN} info
67-
${SLIC_BIN} config
68-
- name: Set up StellarWP DB
69-
run: |
70-
${SLIC_BIN} use validation
71-
${SLIC_BIN} composer install --ignore-platform-reqs
72-
- name: Run suites
73-
run: ${SLIC_BIN} run ${{ matrix.suite }} --ext DotReporter
44+
- name: Set up slic env vars
45+
run: |
46+
echo "SLIC_BIN=${GITHUB_WORKSPACE}/slic/slic" >> $GITHUB_ENV
47+
echo "SLIC_WP_DIR=${GITHUB_WORKSPACE}/slic/_wordpress" >> $GITHUB_ENV
48+
echo "SLIC_WORDPRESS_DOCKERFILE=Dockerfile.base" >> $GITHUB_ENV
49+
- name: Set run context for slic
50+
run: echo "SLIC=1" >> $GITHUB_ENV && echo "CI=1" >> $GITHUB_ENV
51+
- name: Start ssh-agent
52+
run: |
53+
mkdir -p "${HOME}/.ssh"
54+
ssh-agent -a /tmp/ssh_agent.sock
55+
- name: Export SSH_AUTH_SOCK env var
56+
run: echo "SSH_AUTH_SOCK=/tmp/ssh_agent.sock" >> $GITHUB_ENV
57+
- name: Set up slic for CI
58+
run: |
59+
cd ${GITHUB_WORKSPACE}/..
60+
${SLIC_BIN} here
61+
${SLIC_BIN} interactive off
62+
${SLIC_BIN} build-prompt off
63+
${SLIC_BIN} build-subdir off
64+
${SLIC_BIN} xdebug off
65+
${SLIC_BIN} debug on
66+
${SLIC_BIN} info
67+
${SLIC_BIN} config
68+
- name: Set up StellarWP DB
69+
run: |
70+
${SLIC_BIN} use validation
71+
${SLIC_BIN} composer install --ignore-platform-reqs
72+
- name: Run suites
73+
run: ${SLIC_BIN} run ${{ matrix.suite }} --ext DotReporter

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.DS_Store
22
.idea
33
vendor
4-
4+
.phpunit.result.cache

.phpunit.result.cache

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)