Debugging GitHub Actions | Bondar Academy
Course: Claude Code for Playwright
Module: Playwright Workflows with Claude Code
Instructor: Artem Bondar
Lesson Summary
This lesson covers how to debug tests in CI/CD environments using Cloud Code and GitHub CLI . It provides a streamlined approach to identify and resolve test failures without manually downloading reports. Debugging Tests in CI/CD When tests fail during execution in GitHub Actions , the process of analyzing failures can be cumbersome. Instead, you can leverage Cloud Code to automate this debugging process. Setup Steps Install GitHub CLI: For Mac: Use brew install gh . For Windows and Linux: Explore installation options available. Login: Authenticate using gh login or gh authorize . Options include access token, SSH, or username/password. Debugging Process Once authenticated, the agent can interact with your GitHub account to debug failed tests: Check if GitHub CLI is installed and authenticated. Identify the failed test run using gh run list and gh run view . Download the artifact from the failed pipeline. Locate the relevant trace and analyze it using CLI commands. Configuration Requirements Ensure that your playwright-config.ts file has the setting for trace reports enabled on the first retry. This allows the trace report to be attached to the final report in the CI/CD pipeline. Conclusion This method simplifies the debugging process in CI/CD, making it efficient and user-friendly. By utilizing the agent to analyze failures, you can quickly identify fixes and improve your testing workflow.