Commit 53b5f01824
Verified · cmc
Layout: unified · split
.github/workflows/ci.yml deleted −83
| @@ -1,83 +0,0 @@ | ||
| 1 | name: CI | |
| 2 | ||
| 3 | on: | |
| 4 | push: | |
| 5 | branches: | |
| 6 | - main | |
| 7 | pull_request: | |
| 8 | branches: | |
| 9 | - main | |
| 10 | ||
| 11 | permissions: | |
| 12 | contents: read | |
| 13 | ||
| 14 | jobs: | |
| 15 | test: | |
| 16 | name: Test | |
| 17 | runs-on: ubuntu-latest | |
| 18 | strategy: | |
| 19 | matrix: | |
| 20 | go-version: ['1.18', '1.21'] | |
| 21 | steps: | |
| 22 | - uses: actions/checkout@v7 | |
| 23 | ||
| 24 | - name: Set up Go | |
| 25 | uses: actions/setup-go@v6 | |
| 26 | with: | |
| 27 | go-version: ${{ matrix.go-version }} | |
| 28 | ||
| 29 | - name: Cache Go modules | |
| 30 | uses: actions/cache@v6 | |
| 31 | with: | |
| 32 | path: ~/go/pkg/mod | |
| 33 | key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
| 34 | restore-keys: | | |
| 35 | ${{ runner.os }}-go-${{ matrix.go-version }}- | |
| 36 | ||
| 37 | - name: Download dependencies | |
| 38 | run: go mod download | |
| 39 | ||
| 40 | - name: Run tests | |
| 41 | run: go test -v -race -coverprofile=coverage.out ./... | |
| 42 | ||
| 43 | - name: Upload coverage | |
| 44 | uses: codecov/codecov-action@v7 | |
| 45 | with: | |
| 46 | files: ./coverage.out | |
| 47 | flags: unittests | |
| 48 | name: codecov-umbrella | |
| 49 | ||
| 50 | lint: | |
| 51 | name: Lint | |
| 52 | runs-on: ubuntu-latest | |
| 53 | steps: | |
| 54 | - uses: actions/checkout@v7 | |
| 55 | ||
| 56 | - name: Set up Go | |
| 57 | uses: actions/setup-go@v6 | |
| 58 | with: | |
| 59 | go-version: '1.21' | |
| 60 | ||
| 61 | - name: golangci-lint | |
| 62 | uses: golangci/golangci-lint-action@v9 | |
| 63 | with: | |
| 64 | version: latest | |
| 65 | args: --timeout=5m | |
| 66 | ||
| 67 | build: | |
| 68 | name: Build | |
| 69 | runs-on: ubuntu-latest | |
| 70 | needs: [test, lint] | |
| 71 | steps: | |
| 72 | - uses: actions/checkout@v7 | |
| 73 | ||
| 74 | - name: Set up Go | |
| 75 | uses: actions/setup-go@v6 | |
| 76 | with: | |
| 77 | go-version: '1.21' | |
| 78 | ||
| 79 | - name: Build | |
| 80 | run: go build -v ./... | |
| 81 | ||
| 82 | - name: Verify module | |
| 83 | run: go mod verify | |
.github/workflows/go.yml deleted −28
| @@ -1,28 +0,0 @@ | ||
| 1 | name: Go | |
| 2 | ||
| 3 | on: | |
| 4 | push: | |
| 5 | branches: [ "main" ] | |
| 6 | pull_request: | |
| 7 | branches: [ "main" ] | |
| 8 | ||
| 9 | permissions: | |
| 10 | contents: read | |
| 11 | ||
| 12 | jobs: | |
| 13 | ||
| 14 | build: | |
| 15 | runs-on: ubuntu-latest | |
| 16 | steps: | |
| 17 | - uses: actions/checkout@v7 | |
| 18 | ||
| 19 | - name: Set up Go | |
| 20 | uses: actions/setup-go@v6 | |
| 21 | with: | |
| 22 | go-version: '1.20' | |
| 23 | ||
| 24 | - name: Build | |
| 25 | run: go build -v ./... | |
| 26 | ||
| 27 | - name: Test | |
| 28 | run: go test -v ./... | |