Here's an example of a simple one I did that runs the tests and builds and pushes a docker image. My real-world configs run all the steps and build all the images in the same file.
https://github.com/duck1123/me.untethr.nostr-relay/blob/main/Earthfile
Circleci config https://github.com/duck1123/me.untethr.nostr-relay/blob/main/.circleci/config.yml