Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
flc1125 committed Sep 20, 2023
1 parent 269db09 commit 159a24a
Show file tree
Hide file tree
Showing 6 changed files with 108 additions and 5 deletions.
101 changes: 99 additions & 2 deletions pages/case.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ layout: default
- 五子棋
- 跨仓库使用
- uptime
- 单测覆盖率

---

Expand Down Expand Up @@ -407,6 +408,102 @@ jobs:

---

## [Quarto](https://quarto.org/) - 闲聊机器人
## 案例分享 <small>[单测覆盖率](https://about.codecov.io/)</small>

##
推送代码后,触发单测执行,并上报至第三方平台,便于分析查看。[案例地址](https://github.com/go-packagist/go-kratos-components)

<div v-click class="flex gap-1">

<span class="opacity-20">[![Go Version](https://badgen.net/github/release/go-packagist/go-kratos-components/stable)](https://github.com/go-packagist/go-kratos-components/releases)</span>

<span class="opacity-20">[![GoDoc](https://pkg.go.dev/badge/github.com/go-packagist/go-kratos-components)](https://pkg.go.dev/github.com/go-packagist/go-kratos-components)</span>

[![codecov](https://codecov.io/gh/go-packagist/go-kratos-components/branch/master/graph/badge.svg?token=5TWGQ9DIRU)](https://codecov.io/gh/go-packagist/go-kratos-components)

<span class="opacity-20">[![Go Report Card](https://goreportcard.com/badge/github.com/go-packagist/go-kratos-components)](https://goreportcard.com/report/github.com/go-packagist/go-kratos-components)</span>

<span>[![tests](https://github.com/go-packagist/go-kratos-components/actions/workflows/go.yml/badge.svg)](https://github.com/go-packagist/go-kratos-components/actions/workflows/go.yml)</span>

<span class="opacity-20">[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)</span>

</div>

<div class="flex gap-4">

<div v-click class="overflow-auto h-80">

```yaml
name: Go Test
on:
push:
branches: [ master, feature/* ]
pull_request:
branches: [ master ]
env:
GOPROXY: "https://proxy.golang.org"
jobs:
test:
name: "go test"
strategy:
matrix:
go-version: [ 1.18.x, 1.19.x, 1.20.x, 1.21.x ]
platform: [ ubuntu-latest ]
runs-on: ${{ matrix.platform }}
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 6379:6379
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
cache: true
cache-dependency-path: ./go.sum
- run: go version
- name: Run tests
run: go test ./... -v -covermode=atomic -race -coverprofile=coverage.txt
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
```

</div>

<div v-click>

<img src="/assets/images/case-6.png" class="h-80 mt-1" />

</div>

</div>

---
layout: center
class: text-center
hideToc: false
---

<div>

<img src="/assets/images/case-7.png" class="h-120 mt-1" />

</div>

---
layout: center
class: text-center
hideToc: false
---

更多案例……
2 changes: 1 addition & 1 deletion pages/qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ layout: intro

# QA

<p>“ChatGPT” 在手,解惑无忧</p>
<p>你说的都对</p>
4 changes: 3 additions & 1 deletion pages/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ hideInToc: true
- 官方的一些 Actions:https://github.com/actions
- Github Actions 本地调试(⭐48K):https://github.com/nektos/act
- 搭配官方的 CLI 工具:https://github.com/cli/cli
- 用于开发 Github Actions 的一些工具包:https://github.com/actions/toolkit
- 快速构建 Github Pages:https://github.com/peaceiris/actions-gh-pages

---

**一些小知识**
**无关紧要的小提醒**

- 当全站 Github Actions 处理量大时,可能会存在 Queue 的情况;

Expand Down
Binary file added public/assets/images/case-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/case-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,8 @@ hideInToc: true

# The End

<p>Thanks</p>
<p>LGTM</p>

<p v-click>据说它起源于 21 世纪初的谷歌,最初是为了在代码审查中对其他人的工作给予积极的反馈。</p>

<p v-click>现常用于开源界,在 PR 通过 Code Review 后,给与的一个认可。同样:也意味该 PR 可以合并到主分支。</p>

0 comments on commit 159a24a

Please sign in to comment.