nx-cloud-main.yml returns Error with exit code 1 when another yml is present
I have two actions (see below).
Even though all jobs in each .yml complete successfully, the Nx Cloud - Main Job returns Error: Process completed with exit code 1.
This only occurs when there is another .yml present (even if that .yml isn't triggered (i.e. only runs on push to main etc)
Any idea why this is?
# Based on template from nx - https://github.com/nrwl/ci
name: Pull Request Flow
on:
pull_request:
jobs:
main:
name: Nx Cloud - Main Job
uses: nrwl/ci/.github/workflows/[email protected]
with:
environment-variables: |
NX_CLOUD_DISTRIBUTED_EXECUTION=true
main-branch-name: master
number-of-agents: 3
init-commands: |
npx nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
parallel-commands: |
npx nx-cloud record -- npx nx format:check
parallel-commands-on-agents: |
npx nx affected --target=lint --parallel=3 --base=$NX_BASE --head=$NX_HEAD
npx nx affected --target=test --parallel=3 --ci --code-coverage --base=$NX_BASE --head=$NX_HEAD
npx nx affected --target=build --parallel=3 --base=$NX_BASE --head=$NX_HEAD
agents:
name: Nx Cloud - Agents
uses: nrwl/ci/.github/workflows/[email protected]
with:
number-of-agents: 3
and another action
name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
pull_request:
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
Raw Log: log.txt
I don't see how these two are connected. It's best that you reach out to someone from GitHub team.
Otherwise, I would start debugging by commenting out most of the second workflow and see at which point it starts breaking. I would assume that existence of multiple workflows should not break either of them.
Since this is a question, and it is blocked at the moment, I will be closing this issue. If you think it should be reopened, please tag me here and I will reopen, or create a new issue and mention this one!
Thank you everyone!