github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/.circleci/config.yml (about)

     1  version: 2.1
     2  
     3  commands:
     4    make:
     5      parameters:
     6        description:
     7          type: string
     8        target:
     9          type: string
    10      steps:
    11        - attach_workspace:
    12            at: /tmp/bin
    13        - restore_cache:
    14            name: "Restore source code cache"
    15            keys:
    16              - go-src-v1-{{ .Revision }}
    17        - checkout
    18        - restore_cache:
    19            name: "Restore go modules cache"
    20            keys:
    21              - go-mod-v1-{{ checksum "go.sum" }}
    22        - run:
    23            name: << parameters.description >>
    24            command: |
    25              export BINDIR=/tmp/bin
    26              make << parameters.target >>
    27  jobs:
    28    build:
    29      docker:
    30        - image: circleci/golang:1.17
    31      working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
    32      steps:
    33        - checkout
    34        - restore_cache:
    35            name: Restore go modules cache
    36            keys:
    37              - go-mod-v1-{{ checksum "go.sum" }}
    38        - run:
    39            name: run go mod tidy first
    40            command: go mod tidy
    41        # If there are any diffs from goimports or go mod tidy, fail.
    42        - run:
    43            name: Verify no changes from go mod tidy
    44            command: |
    45              if [ -n "$(git status --porcelain)" ]; then
    46                echo "need run 'go mod tidy' before commit"
    47                exit 1
    48              fi
    49        - run:
    50            name: Cache go modules
    51            command: make go-mod-cache
    52        - run:
    53            name: Build
    54            command: make build
    55        - save_cache:
    56            name: Save go modules cache
    57            key: go-mod-v1-{{ checksum "go.sum" }}
    58            paths:
    59              - "/go/pkg/mod"
    60        - save_cache:
    61            name: Save source code cache
    62            key: go-src-v1-{{ .Revision }}
    63            paths:
    64              - ".git"
    65        - run:
    66            name: Run tests with coverage and upload codecov
    67            no_output_timeout: 30m
    68            command: |
    69              echo 'noop'
    70              #touch coverage.txt
    71              #bash <(curl -s https://codecov.io/bash) -f coverage.txt
    72  #            ("./app" "./x/dex" "./x/backend"   "./x/order"  "./x/token" "./x/ammswap" "./x/farm"  "./x/backend")
    73  #            included_packages=("./app" "./x/backend" "./x/common" "./x/params" "./x/distribution" "./x/staking" "./x/gov" "./x/dex" "./x/ammswap" "./x/token" "./x/order" "./x/farm" "./x/evm")
    74