github.com/machinefi/w3bstream@v1.6.5-rc9.0.20240426031326-b8c7c4876e72/.github/workflows/ci_linux.yml (about)

     1  name: ci_linux
     2  
     3  on:
     4    push:
     5      branches: [ "main" ]
     6      tags: [ "v*.*.*" ]
     7    pull_request:
     8      branches: [ "main" ]
     9  
    10  env:
    11    REGISTRY: ghcr.io
    12    IMAGE_NAME: ${{ github.repository }}
    13  
    14  jobs:
    15    build:
    16      runs-on: ${{ matrix.os }}
    17      strategy:
    18        matrix:
    19          os: [ ubuntu-latest ]
    20      permissions:
    21        contents: read
    22        packages: write
    23        id-token: write
    24  
    25      steps:
    26        - uses: actions/checkout@v3
    27          with:
    28            ref: ${{ github.event.pull_request.head.sha }}
    29            fetch-depth: 0
    30  
    31        - name: Setup Go
    32          uses: actions/setup-go@v3
    33          with:
    34            go-version: 1.21
    35  
    36        - name: Build Go
    37          run: make targets
    38  
    39        # Docker is not installed by default on macos base image for license reason : https://github.com/actions/runner-images/issues/17
    40        - name: Setup Docker and Colima
    41          if: startsWith(matrix.os, 'macos-latest') == true
    42          run: |
    43            brew install docker colima
    44            colima start
    45  
    46        - name: Test Go
    47          run: make test
    48  
    49        #- name: Set up QEMU
    50        #  #if: startsWith(matrix.os, 'macos-latest') != true
    51        #  uses: docker/setup-qemu-action@v2
    52  
    53        #- name: Setup Docker buildx
    54        #  uses: docker/setup-buildx-action@v2
    55  
    56        #- name: Log into registry ${{ env.REGISTRY }}
    57        #  if: github.event_name != 'pull_request'
    58        #  uses: docker/login-action@v2
    59        #  with:
    60        #    registry: ${{ env.REGISTRY }}
    61        #    username: ${{ github.actor }}
    62        #    password: ${{ secrets.GITHUB_TOKEN }}
    63  
    64        #- name: Extract Docker metadata
    65        #  id: meta
    66        #  uses: docker/metadata-action@v4
    67        #  with:
    68        #    images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
    69  
    70        - name: Upload Code Coverage Profile
    71          uses: codecov/codecov-action@v3