github.com/isyscore/isc-gobase@v1.5.3-0.20231218061332-cbc7451899e9/.github/workflows/go.yml (about)

     1  # This workflow will build a golang project
     2  # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
     3  
     4  name: Go
     5  
     6  on:
     7    push:
     8      branches: [ "main" ]
     9    pull_request:
    10      branches: [ "main" ]
    11  
    12  jobs:
    13  
    14    Init:
    15      runs-on: ubuntu-latest
    16      steps:
    17        - uses: actions/checkout@v3
    18  
    19        - name: Set up Go
    20          uses: actions/setup-go@v3
    21          with:
    22            go-version: 1.18
    23  
    24        - name: Set up JDK 17
    25          uses: actions/setup-java@v3
    26          with:
    27            java-version: '17'
    28            distribution: 'temurin'
    29  
    30        - name: Init
    31          run: |
    32            go mod tidy
    33            sudo ln $JAVA_HOME/include/jni.h /usr/local/include 
    34            sudo ln $JAVA_HOME/include/linux/jni_md.h /usr/local/include 
    35            sudo ln $JAVA_HOME/lib/server/libjvm.so /usr/local/lib
    36  
    37  
    38        - name: Build
    39          run: go build -v ./...
    40  
    41        - name: Test
    42          run: |
    43            go test ./config/test
    44            go test ./isc/test
    45            go test ./validate/test
    46            go test ./compress/test
    47            go test ./cron/test
    48            go test ./encoding/test
    49            go test ./file/test
    50            go test ./goid/test
    51            go test ./i18n/test
    52            go test ./coder/test
    53            go test ./time/test
    54            go test ./listener/test
    55            go test ./bean/test
    56