github.com/astrogo/cfitsio@v0.1.0/.github/workflows/ci.yml (about)

     1  name: CI
     2  
     3  on:
     4    push:
     5      branches: [ master ]
     6    pull_request:
     7      branches: [ master ]
     8  
     9  env:
    10    TAGS: "-tags=ci"
    11    COVERAGE: "-coverpkg=github.com/astrogo/cfitsio/..."
    12  
    13  jobs:
    14  
    15    build:
    16      name: Build
    17      strategy:
    18        matrix:
    19          go-version: [1.16.x, 1.15.x]
    20          platform: [ubuntu-latest]
    21      runs-on: ${{ matrix.platform }}
    22      steps:
    23      - name: Install Go
    24        uses: actions/setup-go@v2
    25        with:
    26          go-version: ${{ matrix.go-version }}
    27   
    28      - name: Cache-Go
    29        uses: actions/cache@v1
    30        with:
    31          path: |
    32              ~/go/pkg/mod              # Module download cache
    33              ~/.cache/go-build         # Build cache (Linux)
    34              ~/Library/Caches/go-build # Build cache (Mac)
    35              '%LocalAppData%\go-build' # Build cache (Windows)
    36  
    37          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    38          restore-keys: |
    39            ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    40  
    41      - name: Checkout code
    42        uses: actions/checkout@v2
    43  
    44      - name: Install Linux packages
    45        if: matrix.platform == 'ubuntu-latest'
    46        run: |
    47          sudo apt-get update
    48          sudo apt-get install -qq pkg-config libcfitsio-bin libcfitsio-dev
    49   
    50      - name: Build-Linux-64b
    51        if: matrix.platform == 'ubuntu-latest'
    52        run: |
    53          GOARCH=amd64 go install -v $TAGS ./...
    54  
    55      - name: Test Linux
    56        if: matrix.platform == 'ubuntu-latest'
    57        run: |
    58          go run ./ci/run-tests.go $TAGS -race $COVERAGE
    59  
    60      - name: Upload-Coverage
    61        if: matrix.platform == 'ubuntu-latest'
    62        uses: codecov/codecov-action@v1