Skip to content

Commit

Permalink
circle-ci: run table demo and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jedib0t committed Jan 4, 2024
1 parent 1b4e788 commit d25219b
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions .circleci/config.yml
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

0 comments on commit d25219b

Please sign in to comment.