cli + tui to publish to leaflet (wip) & manage tasks, notes & watch/read lists 馃崈
charm leaflet readability golang
at main 62 lines 1.4 kB view raw
1name: Test and Coverage 2 3on: 4 push: 5 branches: [ main, master ] 6 pull_request: 7 branches: [ main, master ] 8 9jobs: 10 test: 11 runs-on: ubuntu-latest 12 13 strategy: 14 matrix: 15 go-version: [1.24.x] 16 17 steps: 18 - uses: actions/checkout@v4 19 20 - name: Set up Go 21 uses: actions/setup-go@v5 22 with: 23 go-version: ${{ matrix.go-version }} 24 25 - name: Cache Go modules 26 uses: actions/cache@v4 27 with: 28 path: | 29 ~/.cache/go-build 30 ~/go/pkg/mod 31 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 32 restore-keys: | 33 ${{ runner.os }}-go- 34 35 - name: Download dependencies 36 run: go mod download 37 38 - name: Verify dependencies 39 run: go mod verify 40 41 - name: Run tests 42 run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./... 43 44 - name: Generate coverage report 45 run: go tool cover -html=coverage.out -o coverage.html 46 47 - name: Upload coverage reports to Codecov 48 uses: codecov/codecov-action@v4 49 with: 50 token: ${{ secrets.CODECOV_TOKEN }} 51 file: ./coverage.out 52 flags: unittests 53 name: codecov-umbrella 54 fail_ci_if_error: false 55 56 - name: Upload coverage artifact 57 uses: actions/upload-artifact@v4 58 with: 59 name: coverage-report 60 path: | 61 coverage.out 62 coverage.html