Skip to content

Commit

Permalink
Merge pull request #21 from marcinkapturski/show-logs-from-steps
Browse files Browse the repository at this point in the history
Showing logs from the run as a workflow step
  • Loading branch information
marcinkapturski authored Oct 30, 2023
2 parents bb95e90 + 754a392 commit ab958c2
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 34,772 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cy-automation-tests-complexity1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ jobs:
run: |
export BRANCH_NAME=${GITHUB_REF#refs/heads/}
export RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
echo "Workflow trigger: "
echo ${{ github.event_name }}
12 changes: 12 additions & 0 deletions .github/workflows/cy-automation-tests-complexity2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,15 @@ jobs:
with:
name: cypress-videos
path: ${{ github.workspace }}/cypress/videos

- name: Logs from the run
if: always()
run: |
echo "--<< BRANCH_NAME >>--"
export BRANCH_NAME=${GITHUB_REF#refs/heads/}
echo "--<< GITHUB ACTION RUN URL >>--"
export RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
echo "--<< WORKFLOW TRIGGER EVENT NAME >>--"
echo ${{ github.event_name }}
echo "--<< CYPRESS VIDEOS FILES >>--"
ls -lh ${{ github.workspace }}/cypress/video
15 changes: 12 additions & 3 deletions .github/workflows/cy-automation-tests-complexity3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
run-specs:
name: Run Tests
runs-on: ubuntu-latest
env:
DEFAULT_ENV: localhost
ENV_TYPE: ${{ inputs.environment }}

steps:
- name: Checkout repository
Expand Down Expand Up @@ -55,3 +52,15 @@ jobs:
with:
name: cypress-videos
path: ${{ github.workspace }}/cypress/videos

- name: Logs from the run
if: always()
run: |
echo "--<< BRANCH_NAME >>--"
export BRANCH_NAME=${GITHUB_REF#refs/heads/}
echo "--<< GITHUB ACTION RUN URL >>--"
export RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
echo "--<< WORKFLOW TRIGGER EVENT NAME >>--"
echo ${{ github.event_name }}
echo "--<< SELECTED BROWSER >>--"
echo ${{ inputs.browser }}
20 changes: 20 additions & 0 deletions .github/workflows/cy-automation-tests-complexity4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,23 @@ jobs:
with:
name: cypress-videos
path: ${{ github.workspace }}/cypress/videos

- name: Logs from the run
if: always()
run: |
echo "--<< BRANCH_NAME >>--"
export BRANCH_NAME=${GITHUB_REF#refs/heads/}
echo "--<< GITHUB ACTION RUN URL >>--"
export RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
echo "--<< WORKFLOW TRIGGER EVENT NAME >>--"
echo ${{ github.event_name }}
echo "--<< SELECTED ENVIRONMENT >>--"
echo ${{ inputs.environment }}
echo "--<< SELECTED BROWSER >>--"
echo ${{ inputs.browser }}
echo "--<< CYPRESS CONFIG LOCALHOST >>--"
cat ${{ github.workspace }}/cypress/configs/cypress.localhost.config.js
echo "--<< CYPRESS CONFIG DEV >>--"
cat ${{ github.workspace }}/cypress/configs/cypress.dev.config.js
echo "--<< LOCAL APP FRROM BUILD STEP >>--"
ls -lh ${{ github.workspace }}/build
26 changes: 26 additions & 0 deletions .github/workflows/cy-automation-tests-complexity5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ jobs:
if-no-files-found: error
path: build

- name: Logs from build folder
if: always()
run: |
echo "--<< LOCAL APP FRROM BUILD STEP >>--"
ls -lh ${{ github.workspace }}/build
run-specs:
name: Run Tests
needs: [build-packages]
Expand Down Expand Up @@ -119,3 +125,23 @@ jobs:
with:
name: cypress-videos
path: ${{ github.workspace }}/cypress/videos

- name: Logs from the run
if: always()
run: |
echo "--<< BRANCH_NAME >>--"
export BRANCH_NAME=${GITHUB_REF#refs/heads/}
echo "--<< GITHUB ACTION RUN URL >>--"
export RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
echo "--<< WORKFLOW TRIGGER EVENT NAME >>--"
echo ${{ github.event_name }}
echo "--<< SELECTED ENVIRONMENT >>--"
echo ${{ inputs.environment }}
echo "--<< SELECTED BROWSER >>--"
echo ${{ inputs.browser }}
echo "--<< CYPRESS CONFIG LOCALHOST >>--"
cat ${{ github.workspace }}/cypress/configs/cypress.localhost.config.js
echo "--<< CYPRESS CONFIG DEV >>--"
cat ${{ github.workspace }}/cypress/configs/cypress.dev.config.js
echo "--<< LOCAL APP FRROM BUILD STEP >>--"
ls -lh ${{ github.workspace }}/build
26 changes: 26 additions & 0 deletions .github/workflows/cy-automation-tests-complexity6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ jobs:
if-no-files-found: error
path: build

- name: Logs from build folder
if: always()
run: |
echo "--<< LOCAL APP FRROM BUILD STEP >>--"
ls -lh ${{ github.workspace }}/build
run-specs:
name: Run Tests
needs: [build-packages]
Expand Down Expand Up @@ -120,6 +126,26 @@ jobs:
name: cypress-videos
path: ${{ github.workspace }}/cypress/videos

- name: Logs from the run
if: always()
run: |
echo "--<< BRANCH_NAME >>--"
export BRANCH_NAME=${GITHUB_REF#refs/heads/}
echo "--<< GITHUB ACTION RUN URL >>--"
export RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
echo "--<< WORKFLOW TRIGGER EVENT NAME >>--"
echo ${{ github.event_name }}
echo "--<< SELECTED ENVIRONMENT >>--"
echo ${{ inputs.environment }}
echo "--<< SELECTED BROWSER >>--"
echo ${{ inputs.browser }}
echo "--<< CYPRESS CONFIG LOCALHOST >>--"
cat ${{ github.workspace }}/cypress/configs/cypress.localhost.config.js
echo "--<< CYPRESS CONFIG DEV >>--"
cat ${{ github.workspace }}/cypress/configs/cypress.dev.config.js
echo "--<< LOCAL APP FRROM BUILD STEP >>--"
ls -lh ${{ github.workspace }}/build
report:
name: Report result
needs: [run-specs]
Expand Down
Loading

0 comments on commit ab958c2

Please sign in to comment.