I don't seem able to get ACTIONS_STEP_DEBUG to give me detailed log output
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
I'm trying to see why my if statements are not working correctly, As stated in the guide here I've added to variables to my env portion, but I don't see what my variables are being evaluated as when I download the log archive!
My actions file looks as follows:
name: QA - Playwright Tests
on:
push:
branches: ["AT_test_fixes"]
env:
EMAIL_USERNAME: ${{ secrets.PLAYWRIGHT_PROD_EMAIL }}
EMAIL_PASSWORD: ${{ secrets.PLAYWRIGHT_PASSWORD }}
CREATE_ACCOUNT_VALID_EMAIL: ${{ secrets.PLAYWRIGHT_NEW_ACCOUNT_EMAIL }}
CREATE_ACCOUNT_VALID_PASSWORD: ${{ secrets.PLAYWRIGHT_NEW_ACCOUNT_PASSWORD }}
ACTIONS_RUNNER_DEBUG: true
ACTIONS_STEP_DEBUG: true
jobs:
docker-test:
if: github.event_name == 'pull_request'
name: Build & Test locally
runs-on: [self-hosted, Docker]
env:
working-dir: testing/playwright
EMAIL_USERNAME: ${{ secrets.PLAYWRIGHT_DEV_EMAIL }}
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* || rm -rf /github/workspace/*"
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.16.0
- name: Build container
working-directory: testing/playwright
run: docker compose -f docker-compose.yml build
- name: Run containerized tests
working-directory: testing/playwright
run:
docker compose -f docker-compose.yml up --abort-on-container-exit
- name: Copy report volume
if: always()
run: |
rm -rf ./playwright-report
mkdir playwright-report
docker cp testContainer:/app/playwright-report ${{ env.working-dir }}/playwright-report
docker cp testContainer:/app/test-results ${{ env.working-dir }}/test-results
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: ${{env.working-dir}}/playwright-report/
- uses: actions/upload-artifact@v3
name: upload video (if failed)
if: failure()
with:
name: Video recording
path: ${{env.working-dir}}/test-results/
prod-test:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
timeout-minutes: 60
runs-on: ubuntu-latest
env:
working-dir: testing/playwright
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.16.0
- name: Install dependencies
working-directory: ${{ env.working-dir }}
run: |
npm ci
cat playwright.ci.env >> .env
- name: Install Playwright Browsers
working-directory: ${{ env.working-dir }}
run: npx playwright install --with-deps
- name: Run Playwright tests
working-directory: ${{ env.working-dir }}
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: ${{env.working-dir}}/playwright-report/
retention-days: 1
############################### SLACK REPORTING #########################################
reporting:
name: Generate Test Report
needs: [docker-test, prod-test]
runs-on: ubuntu-latest
if: always()
steps:
- name: Send failed Slack message
if: ${{ needs.docker-test.result == 'failure' || needs.prod-test.result == 'failure' }}
uses: slackapi/slack-github-action@v1.23.0
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "@${{ github.actor }} \n :boom: *Playwright Tests* Failed"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Failed Tests> \n branch: `${{ github.head_ref || 'Main' }}`"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Get previous workflow status
uses: Mercymeilya/last-workflow-status@v0.3.3
id: last_status
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: send fixed Slack message
if: |
always() &&
${{ ((needs.docker-test.result == 'success') && (steps.last_status.outputs.last_status == 'failure')) || ((needs.prod-test.result == 'success') && (steps.last_status.outputs.last_status == 'failure')) }}
uses: slackapi/slack-github-action@v1.23.0
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "@${{ github.actor }} \n :white_check_mark: *Playwright Tests* Are passing again"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Test Summary> \n Environment: `${{ github.head_ref || 'Prod' }}`"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets._SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked GitHub Actions debug-logging guide and the workflow configuration in the issue, focusing on ACTIONS_RUNNER_DEBUG, ACTIONS_STEP_DEBUG, and the if expressions. Compare the expected diagnostic output with the downloaded log archive; done means the relevant step and expression evaluation details are present or the limitation is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100