Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add throws tags and better generics #36

Merged
merged 8 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Configure PHP environment
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: mbstring, intl
coverage: none
- uses: ramsey/composer-install@v2
- uses: ramsey/composer-install@v3
with:
composer-options: "--ignore-platform-reqs --optimize-autoloader"
- name: Run PHPStan static analysis
Expand Down
24 changes: 8 additions & 16 deletions .github/workflows/tests-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 1000
submodules: recursive
# ------------------------------------------------------------------------------
# Checkout slic
# ------------------------------------------------------------------------------
- name: Checkout slic
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: stellarwp/slic
ref: main
path: slic
fetch-depth: 1
# ------------------------------------------------------------------------------
# Prepare our composer cache directory
# ------------------------------------------------------------------------------
- name: Get Composer Cache Directory
id: get-composer-cache-dir
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
id: composer-cache
with:
path: ${{ steps.get-composer-cache-dir.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-

# ------------------------------------------------------------------------------
# Initialize slic
# ------------------------------------------------------------------------------
Expand All @@ -46,14 +33,17 @@ jobs:
echo "SLIC_BIN=${GITHUB_WORKSPACE}/slic/slic" >> $GITHUB_ENV
echo "SLIC_WP_DIR=${GITHUB_WORKSPACE}/slic/_wordpress" >> $GITHUB_ENV
echo "SLIC_WORDPRESS_DOCKERFILE=Dockerfile.base" >> $GITHUB_ENV

- name: Set run context for slic
run: echo "SLIC=1" >> $GITHUB_ENV && echo "CI=1" >> $GITHUB_ENV
- name: Start ssh-agent
run: |
mkdir -p "${HOME}/.ssh";
ssh-agent -a /tmp/ssh_agent.sock;

- name: Export SSH_AUTH_SOCK env var
run: echo "SSH_AUTH_SOCK=/tmp/ssh_agent.sock" >> $GITHUB_ENV

- name: Set up slic for CI
run: |
cd ${GITHUB_WORKSPACE}/..
Expand All @@ -65,9 +55,11 @@ jobs:
${SLIC_BIN} debug on
${SLIC_BIN} info
${SLIC_BIN} config

- name: Set up StellarWP Schema
run: |
${SLIC_BIN} use schema
${SLIC_BIN} composer install --ignore-platform-reqs

- name: Run suite tests
run: ${SLIC_BIN} run ${{ matrix.suite }} --ext DotReporter
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
"codeception/module-webdriver": "^1.0",
"codeception/util-universalframework": "^1.0",
"lucatume/di52": "^3.0",
"lucatume/wp-browser": "^3.0.14",
"lucatume/wp-browser": "^3.0 < 3.5",
"phpunit/phpunit": "~6.0",
"stellarwp/db": "^1.0",
"stellarwp/db": "^1.1",
"symfony/event-dispatcher-contracts": "^2.5.1",
"symfony/string": "^5.4",
"szepeviktor/phpstan-wordpress": "^1.1"
"szepeviktor/phpstan-wordpress": "^1.1",
"php-stubs/wp-cli-stubs": "^2.11"
},
"minimum-stability": "stable",
"autoload": {
Expand Down
Loading