Tuist cloud on CI

Question or problem

Hey, just want to clarify, when using tuist cloud on ci, to skip the auth, we need to pass the env params. I am doing it like that with github actions;

- name: Test project
      env:
        TUIST_CONFIG_TOKEN: ${{ secrets.TUIST_TOKEN }}
        CI: true
      run: |
        tuist test Debug

However on CI, getting these errors:

Generating project for testing
Loading and constructing the graph
It might take a while if the cache is empty
Uploading run metadata...
Failed to upload run metadata: You need to be authenticated to access this resource.
▌ ✖ Error 
▌ We could not find external dependencies. Run `tuist install` before you continue. 
▌
▌ Sorry this didn’t work. Here’s what to try next:

Context

  • Tuist version: 4.47.0

Give us some context on what you were trying to do when you stumbled upon the need to create this topic in the community forum.

Do I missed something, or values was renamed?

Hey @ichikmarev :wave:

Before running tuist test, you will need to run tuist install.

How did you end up creating the token?

I’d suggest checking the following:

  • Get the fullHandle in your Tuist.swift file
  • Run tuist project tokens create xx/yy where xx/yy should be the value of the fullHandle from Tuist.swift
  • Store that secret in GitHub

Note that CI: true is not needed to set – it shouldn’t cause issues, but might be a good idea to remove regardless.

Hey

Running tuist install as required.

Token was obtain by:

tuist project tokens create Project

And also stored in GHA secrets

How does your Tuist.swift look like? And what’s exactly the command you created the project token with?

If you find any of that to be sensitive info you’d rather not share here, you can shoot us an email at [email protected].

1 Like

Will check everything today and comeback with more info. Thanks for assistance!