调整占位符
修改README
This commit is contained in:
parent
8af7a6c727
commit
b47f978f2b
55
.github/workflows/build.yml
vendored
55
.github/workflows/build.yml
vendored
@ -1,55 +0,0 @@
|
|||||||
name: build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
tags:
|
|
||||||
- v*
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-rust:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest]
|
|
||||||
runs-on: ${{ matrix.platform }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: recursive
|
|
||||||
- name: Install Rust
|
|
||||||
run: rustup toolchain install stable --component llvm-tools-preview
|
|
||||||
- name: Install cargo-llvm-cov
|
|
||||||
uses: taiki-e/install-action@cargo-llvm-cov
|
|
||||||
- name: install nextest
|
|
||||||
uses: taiki-e/install-action@nextest
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- name: Check code format
|
|
||||||
run: cargo fmt -- --check
|
|
||||||
- name: Check the package for errors
|
|
||||||
run: cargo check --all
|
|
||||||
- name: Lint rust sources
|
|
||||||
run: cargo clippy --all-targets --all-features --tests --benches -- -D warnings
|
|
||||||
- name: Execute rust tests
|
|
||||||
run: cargo nextest run --all-features
|
|
||||||
- name: Generate a changelog
|
|
||||||
uses: orhun/git-cliff-action@v2
|
|
||||||
id: git-cliff
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
with:
|
|
||||||
config: cliff.toml
|
|
||||||
args: -vv --latest --strip header
|
|
||||||
env:
|
|
||||||
OUTPUT: CHANGES.md
|
|
||||||
- name: Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
with:
|
|
||||||
body: ${{ steps.git-cliff.outputs.content }}
|
|
33
README.md
33
README.md
@ -1,6 +1,7 @@
|
|||||||
# Geektime Rust 语言训练营
|
# {{ project-name }}
|
||||||
|
{{ project_description }}
|
||||||
|
|
||||||
## 环境设置
|
## 环境设置说明
|
||||||
|
|
||||||
### 安装 Rust
|
### 安装 Rust
|
||||||
|
|
||||||
@ -8,13 +9,13 @@
|
|||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### 安装 VSCode 插件
|
### 推荐安装的 VSCode 插件
|
||||||
|
|
||||||
- crates: Rust 包管理
|
- Dependi: Rust 包管理
|
||||||
- Even Better TOML: TOML 文件支持
|
- Even Better TOML: TOML 文件支持
|
||||||
- Better Comments: 优化注释显示
|
- Better Comments: 优化注释显示
|
||||||
- Error Lens: 错误提示优化
|
- Error Lens: 错误提示优化
|
||||||
- GitLens: Git 增强
|
- GitLens — Git supercharged: Git 增强
|
||||||
- Github Copilot: 代码提示
|
- Github Copilot: 代码提示
|
||||||
- indent-rainbow: 缩进显示优化
|
- indent-rainbow: 缩进显示优化
|
||||||
- Prettier - Code formatter: 代码格式化
|
- Prettier - Code formatter: 代码格式化
|
||||||
@ -26,20 +27,6 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|||||||
- vscode-icons: 图标优化
|
- vscode-icons: 图标优化
|
||||||
- YAML: YAML 文件支持
|
- YAML: YAML 文件支持
|
||||||
|
|
||||||
### 安装 cargo generate
|
|
||||||
|
|
||||||
cargo generate 是一个用于生成项目模板的工具。它可以使用已有的 github repo 作为模版生成新的项目。
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cargo install cargo-generate
|
|
||||||
```
|
|
||||||
|
|
||||||
在我们的课程中,新的项目会使用 `tyr-rust-bootcamp/template` 模版生成基本的代码:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cargo generate tyr-rust-bootcamp/template
|
|
||||||
```
|
|
||||||
|
|
||||||
### 安装 pre-commit
|
### 安装 pre-commit
|
||||||
|
|
||||||
pre-commit 是一个代码检查工具,可以在提交代码前进行代码检查。
|
pre-commit 是一个代码检查工具,可以在提交代码前进行代码检查。
|
||||||
@ -66,14 +53,6 @@ typos 是一个拼写检查工具。
|
|||||||
cargo install typos-cli
|
cargo install typos-cli
|
||||||
```
|
```
|
||||||
|
|
||||||
### 安装 git cliff
|
|
||||||
|
|
||||||
git cliff 是一个生成 changelog 的工具。
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cargo install git-cliff
|
|
||||||
```
|
|
||||||
|
|
||||||
### 安装 cargo nextest
|
### 安装 cargo nextest
|
||||||
|
|
||||||
cargo nextest 是一个 Rust 增强测试工具。
|
cargo nextest 是一个 Rust 增强测试工具。
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
[placeholders]
|
[placeholders]
|
||||||
manage_on_github = { prompt = "Is repo managed on github", choices = ["Github", "Gitea"], default = "Github", type = "string" }
|
project_description = { prompt = "Project description", type = "string" }
|
Loading…
Reference in New Issue
Block a user