Skip to content

Commit

Permalink
Fix workflow syntax error and re-configure artifacts
Browse files Browse the repository at this point in the history
Logs SHOULD now only be stored, when jobs fails. Also, since we use a matrix of redmine version and php version, the logs are now stored as such, to avoid naming conflicts (overwrites).
  • Loading branch information
aedart committed Feb 20, 2025
1 parent 83a1b06 commit 9b483a9
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/redmine_api_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,27 @@ jobs:
vendor/bin/codecept build
- name: "Run API tests"
# Upload evt. error logs from Redmine as an artifact
uses: actions/upload-artifact@v4
with:
name: 'redmine_logs'
path: ${{ REDMINE_INSTALL_PATH }}/logs/

# Ensure ENV are set...
# @see .testing.example
# @see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsenv
env:
REDMINE_LIVE_TEST: true
REDMINE_API_URI: ${{ env.REDMINE_URL }}
REDMINE_TOKEN: ${{ env.REDMINE_API_KEY }}
run: vendor/bin/codecept run -g redmine --debug
run: vendor/bin/codecept run -g redmine --debug

# ------------------------------------------------------------------------------------------------------- #
# Artifacts
# ------------------------------------------------------------------------------------------------------- #

- name: "Save Redmine logs"
uses: actions/upload-artifact@v4

# Run ONLY in case of failure - no need to store useless data!
# @see https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#status-check-functions
if: ${{ failure() }}
with:
name: "redmine_${{ matrix.redmine-versions }}_php_${{ matrix.php-versions }}_logs"
path: ${{ REDMINE_INSTALL_PATH }}/logs/
if-no-files-found: ignore
retention-days: 10

0 comments on commit 9b483a9

Please sign in to comment.