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

Workflow #8

Merged
merged 2 commits into from
May 26, 2024
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Run Tests

# Comment
on:
push:
branches: [ main ]
Expand Down Expand Up @@ -30,15 +30,15 @@ jobs:
MIN_PHP_VERSION=${{ env.PHP_VERSION }}
PHP_VERSIONS=$(curl -s https://api.github.com/repos/php/php-src/git/refs/tags | jq -r '.[].ref' | grep -E 'refs/tags/php-[0-9]+\.[0-9]+\.[0-9]+$' | sed 's#refs/tags/php-##' | grep -vE 'alpha|beta|rc' | awk -v min=$MIN_PHP_VERSION '$1 >= min')
PHP_VERSIONS_JSON=$(echo $PHP_VERSIONS | jq -Rnc '[inputs | split("\n") | .[] | select(length > 0)]')
echo "versions=${PHP_VERSIONS_JSON}" >> $GITHUB_OUTPUT
echo "versions=$PHP_VERSIONS_JSON" >> $GITHUB_OUTPUT

- name: Fetch available WP versions
id: set-wp-versions
run: |
MIN_WP_VERSION=${{ env.WP_VERSION }}
WP_VERSIONS=$(curl -s https://api.github.com/repos/WordPress/WordPress/git/refs/tags | jq -r '.[].ref' | grep -E 'refs/tags/[0-9]+\.[0-9]+\.[0-9]+$' | sed 's#refs/tags/##' | awk -v min=$MIN_WP_VERSION '$1 >= min')
WP_VERSIONS_JSON=$(echo $WP_VERSIONS | jq -Rnc '[inputs | split("\n") | .[] | select(length > 0)]')
echo "versions=${WP_VERSIONS_JSON}" >> $GITHUB_OUTPUT
echo "versions=$WP_VERSIONS_JSON" >> $GITHUB_OUTPUT

run-tests:
needs: fetch-versions
Expand All @@ -59,7 +59,7 @@ jobs:
tools: composer, wp-cli

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Download WordPress
run: wp core download --version=${{ matrix.wp-version }} --path=wordpress
Expand Down
Loading