Skip to content

Commit

Permalink
MNT Add auto-tag workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Jun 8, 2022
1 parent b17b54f commit c7c604b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/auto-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Auto-tag
on:
push:
tags:
- '*.*.*'
jobs:
auto-tag:
name: Auto-tag
runs-on: ubuntu-latest
steps:
- name: Auto-tag
uses: silverstripe/gha-auto-tag@main
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GitHub Action - Run tests
Run Silverstripe CI matrix tests

See [gha-ci](https://github.com/silverstripe/gha-ci)
Only intended to be used within [gha-ci](https://github.com/silverstripe/gha-ci)
7 changes: 2 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ inputs:
endtoend:
type: boolean
default: false
# if endtoend_suite is blank or "root" it will run suites defined in root behat.yml
# passing this input is intended for extra_jobs running non-root suites
# e.g. running "asset-admin" behat from silverstripe-installer
endtoend_suite:
type: string
required: false
Expand Down Expand Up @@ -73,7 +70,7 @@ runs:
FAIL_ON_WARNING='--fail-on-warning'
fi
echo "Running PHPUnit with options: $FAIL_ON_WARNING"
if [ "$PHPUNIT_SUITE" == "all" ]; then
if [ "$PHPUNIT_SUITE" == "all" ] || [ "$PHPUNIT_SUITE" == "" ]; then
vendor/bin/phpunit --verbose --colors=always $FAIL_ON_WARNING
else
vendor/bin/phpunit --verbose --colors=always --testsuite "$PHPUNIT_SUITE" $FAIL_ON_WARNING
Expand Down Expand Up @@ -145,7 +142,7 @@ runs:
rm __behat_headless.yml
# start chromedriver as a background process
nohup sh -c "chromedriver" > /dev/null 2>&1 &
if [ "$ENDTOEND_SUITE" != "root" ]; then
if [ "$ENDTOEND_SUITE" != "root" ] && [ "$ENDTOEND_SUITE" != "" ]; then
vendor/bin/behat --colors --strict --config __behat.yml "$ENDTOEND_SUITE"
else
vendor/bin/behat --colors --strict --config __behat.yml
Expand Down

0 comments on commit c7c604b

Please sign in to comment.