FCTA - Module 2.5.3 - Error when publishing test results

I’ve hit a problem when working through Module 2.5.3 of the Foundation Certificate in Test Automation. When reviewing the pipeline results in GitHub Actions, I can see that there is an error:


GitHub Copilot suggested that I add some preceding steps to the YAML, to set up Python and the virtual environment, but the pipeline is still failing with the same error. My YAML is below - can anyone help to solve this?

@joanne.macfarlane

It looks like there is an OS mismatch in your configuration. In the first line of your YAML, you are calling the macOS-specific version of the action /macos@v2 , but your logs say that the pipeline is actually running on a Windows runner.

Because Windows doesn’t natively support the shell scripts inside that macOS action, it’s throwing the command not found error.Can you try using the universal version of the command instead, which is compatible with Windows

- name: Publish Test Results
  uses: EnricoMi/publish-unit-test-result-action@v2
  if: always()
  with:
    files: |
      junit.xml
      reports/e2e-report/*.xml