github.com/electroneum/electroneum-sc@v0.0.0-20230105223411-3bc1d078281e/.github/workflows/unit-test.yml (about)

     1  name: Unit Test
     2  
     3  on:
     4    push:
     5      branches: 
     6        - master
     7        - develop
     8  
     9    pull_request:
    10      branches: 
    11        - master
    12        - develop
    13  
    14  jobs:
    15    unit-test:
    16      strategy:
    17        matrix:
    18          go-version: [1.19.x]
    19          os: [ubuntu-latest]
    20      runs-on: ${{ matrix.os }}
    21      steps:
    22      - name: Install Go
    23        uses: actions/setup-go@v2
    24        with:
    25          go-version: ${{ matrix.go-version }}
    26          
    27      - name: Checkout code
    28        uses: actions/checkout@v2
    29  
    30      - uses: actions/cache@v2
    31        with:
    32          # In order:
    33          # * Module download cache
    34          # * Build cache (Linux)
    35          # * Build cache (Mac)
    36          # * Build cache (Windows)
    37          path: |
    38            ~/go/pkg/mod
    39            ~/.cache/go-build
    40            ~/Library/Caches/go-build
    41            %LocalAppData%\go-build
    42          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    43          restore-keys: |
    44            ${{ runner.os }}-go-
    45  
    46      - name: Uint Test
    47        env:
    48          ANDROID_HOME: "" # Skip android test
    49        run: |
    50          go clean -testcache
    51          make test