Skip to content

Commit

Permalink
Merge pull request #58 from the-events-calendar/fix/github-actions-ch…
Browse files Browse the repository at this point in the history
…eckout

Update workflow actions, add to gitignore
  • Loading branch information
Camwyn authored Sep 9, 2024
2 parents e021d24 + dc615e3 commit 921af81
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/tests-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
# Checkout the repo
# ------------------------------------------------------------------------------
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 1000
token: ${{ secrets.GH_BOT_TOKEN }}
Expand All @@ -25,17 +25,20 @@ jobs:
run: |
num_php_files=$(git diff ${{ github.event.pull_request.base.sha }} HEAD --name-only | grep -P "\.php" | wc -l)
if [[ -z "$num_php_files" ]]; then
echo "::set-output name=value::1"
echo "value=1" >> $GITHUB_OUTPUT
echo "## No PHP Files changed, PHP tests automatically pass." >> $GITHUB_STEP_SUMMARY
elif [[ "$num_php_files" == "0" || "$num_php_files" == "" ]]; then
echo "::set-output name=value::1"
echo "value=1" >> $GITHUB_OUTPUT
echo "## No PHP Files changed, PHP tests automatically pass." >> $GITHUB_STEP_SUMMARY
else
echo "::set-output name=value::0"
echo "value=0" >> $GITHUB_OUTPUT
echo "## Found PHP file changes, running PHP tests." >> $GITHUB_STEP_SUMMARY
fi
# ------------------------------------------------------------------------------
# Checkout slic
# ------------------------------------------------------------------------------
- name: Checkout slic
uses: actions/checkout@v2
uses: actions/checkout@v4
if: steps.skip.outputs.value != 1
with:
repository: stellarwp/slic
Expand Down Expand Up @@ -132,7 +135,7 @@ jobs:
# Clone and init TEC
# ------------------------------------------------------------------------------
- name: Clone TEC
uses: actions/checkout@v2
uses: actions/checkout@v4
if: steps.skip.outputs.value != 1
with:
fetch-depth: 1
Expand Down Expand Up @@ -195,7 +198,7 @@ jobs:
# Clone and init ECP
# ------------------------------------------------------------------------------
- name: Clone ECP
uses: actions/checkout@v2
uses: actions/checkout@v4
if: steps.skip.outputs.value != 1
with:
fetch-depth: 1
Expand All @@ -209,7 +212,7 @@ jobs:
run: |
mv ${GITHUB_WORKSPACE}/events-pro ${GITHUB_WORKSPACE}/../events-pro
docker network prune -f
${SLIC_BIN} use events-pro
${SLIC_BIN} use events-pro
${SLIC_BIN} composer install --no-dev
# ------------------------------------------------------------------------------
# Set up Advanced Post Manager and run tests
Expand Down
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,41 @@ node_modules
codeception.yml
tests/*.suite.yml

# /vendor/
.DS_Store
.idea
.vscode
*.code-workspace

# Composer / Package files
node_modules
/files
/vcs
/repo

# Vendor handling.
/vendor

# Some people makes...
Makefile

# Tests - local config files
codeception.yml
tests/*.suite.yml
phpunit.xml

*.local
*.test
*.testing
codeception.tric.yml
codeception.slic.yml

# Tests - local output files
tests/_output
tests/_support/_generated

# Local packaging files
.pup-*

# get from translate.wordpress.org as needed
lang/*.po

0 comments on commit 921af81

Please sign in to comment.