-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,41 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/configuration-reference | ||
version: 2.1 | ||
|
||
# Define a job to be invoked later in a workflow. | ||
# See: https://circleci.com/docs/configuration-reference/#jobs | ||
orbs: | ||
# The Go orb contains a set of prepackaged CircleCI configuration you can utilize | ||
# Orbs reduce the amount of configuration required for common tasks. | ||
# See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/go | ||
go: circleci/go@1.10.0 | ||
|
||
jobs: | ||
say-hello: | ||
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. | ||
# See: https://circleci.com/docs/configuration-reference/#executor-job | ||
# Below is the definition of your job to build and test your app, you can rename and customize it as you want. | ||
build-and-test: | ||
# These next lines define a docker executor: https://circleci.com/docs/executor-types/ | ||
# You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. | ||
# A list of available CircleCI docker Convenience Images are available here: https://circleci.com/developer/images/image/cimg/go | ||
docker: | ||
- image: cimg/base:stable | ||
# Add steps to the job | ||
# See: https://circleci.com/docs/configuration-reference/#steps | ||
- image: cimg/go:1.21.3 | ||
steps: | ||
# Checkout the code as the first step. | ||
- checkout | ||
- go/load-cache # Load cached Go modules. | ||
- go/mod-download # Run 'go mod download'. | ||
- go/save-cache # Save Go modules to cache. | ||
- go/test: # Runs 'go test ./...' but includes extensive parameterization for finer tuning. | ||
covermode: atomic | ||
failfast: true | ||
race: true | ||
- run: | ||
name: "Table-Test" | ||
command: "go test -v ./table" | ||
- run: | ||
name: "Say hello" | ||
command: "echo Hello, World!" | ||
name: "Table-Demo" | ||
command: "go run ./cmd/demo-table" | ||
|
||
# Orchestrate jobs using workflows | ||
# See: https://circleci.com/docs/configuration-reference/#workflows | ||
workflows: | ||
say-hello-workflow: | ||
# Below is the definition of your workflow. | ||
# Inside the workflow, you provide the jobs you want to run, e.g this workflow runs the build-and-test job above. | ||
# CircleCI will run this workflow on every commit. | ||
# For more details on extending your workflow, see the configuration docs: https://circleci.com/docs/configuration-reference/#workflows | ||
sample: | ||
jobs: | ||
- say-hello | ||
- build-and-test |