Using macOS Container to test Safari


#1

I’d like to use the macOS container to run CI against Chrome, Firefox, and Safari. I don’t need any particular version of XCode (or XCode at all), and I don’t want to add an XCode project to my repo.

I’ve started with the same circle.yml file that works on Linux, including these overrides:

dependencies:
  override:
    - yarn run bootstrap
  cache_directories:
    - ~/.cache/yarn

test:
  override:
    - yarn run ci

First I was told that XCODE_SCHEME could not be inferred, so I made one up in Project Settings#env-vars. Now, I’m being told

We couldn't find a workspace or project to build. Try setting this manually with environment variables 'XCODE_WORKSPACE' or 'XCODE_PROJECT'

Can I take control of which commands are running on a macOS container? I just want it to do this:

brew install yarn
yarn run bootstrap
yarn run ci

#2

If you set these two envs (even to empty) your build should run on the macOS fleet as long as you have a plan.


#3

Thanks Joseph!

I think I’ve got it (mostly) working now:

https://circleci.com/gh/material-motion/material-motion-js/74

There’s still a failure, but I think that’s Safari’s fault. The tests do take longer than on Linux (so much so that I had to bump up the default timeout to get Chrome to run at all). I also have to install Firefox (and maybe Chrome?) with Homebrew, since they don’t appear to be on the default image.


#4

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.