github.com/abemedia/go-don@v0.2.2-0.20240329015135-be88e32bb73b/.github/workflows/ci.yml (about)

     1  name: CI
     2  
     3  on:
     4    push:
     5      branches: [master]
     6    pull_request:
     7      branches: [master]
     8  
     9  permissions:
    10    contents: read
    11  
    12  jobs:
    13    test:
    14      name: Test
    15      runs-on: ubuntu-latest
    16      steps:
    17        - name: Checkout repository
    18          uses: actions/checkout@v4
    19  
    20        - name: Setup Go
    21          uses: actions/setup-go@v5
    22          with:
    23            go-version-file: go.mod
    24  
    25        - name: Run tests
    26          run: go test ./... -coverprofile coverage.out
    27  
    28        - name: Upload coverage reports to Codecov
    29          uses: codecov/codecov-action@v4
    30          env:
    31            CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
    32  
    33    lint:
    34      name: Lint
    35      runs-on: ubuntu-latest
    36      steps:
    37        - name: Checkout repository
    38          uses: actions/checkout@v4
    39  
    40        - name: Setup Go
    41          uses: actions/setup-go@v5
    42          with:
    43            go-version-file: go.mod
    44  
    45        - name: Run golangci-lint
    46          uses: golangci/golangci-lint-action@v4
    47          with:
    48            skip-pkg-cache: true
    49            skip-build-cache: true