Skip to content

Commit

Permalink
Merge pull request #2 from Kreedzt/develop
Browse files Browse the repository at this point in the history
✨ add test coverage config
  • Loading branch information
Kreedzt committed Dec 6, 2023
2 parents e2ca9d3 + 1caa281 commit 91e7257
Show file tree
Hide file tree
Showing 17 changed files with 1,270 additions and 129 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on: [push, pull_request]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

jobs:
test:
runs-on: ubuntu-latest
name: Test Coverage
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install
run: npm i -g pnpm && pnpm i
- name: test coverage
run: pnpm run coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ dist-ssr
*.sw?

.idea
.vscode
.vscode

# test
coverage
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
# RWR 热键编辑器
# RWR Hotkey Editor

![license](https://badgen.net/github/license/Kreedzt/rwr-hotkey-editor)
![latest release](https://badgen.net/github/release/Kreedzt/rwr-hotkey-editor)
![commits count](https://badgen.net/github/commits/Kreedzt/rwr-hotkey-editor)
![last commit](https://badgen.net/github/last-commit/Kreedzt/rwr-hotkey-editor)
[![codecov](https://codecov.io/gh/Kreedzt/rwr-hotkey-editor/branch/master/graph/badge.svg?token=MWGXZH7GO9)](https://codecov.io/gh/Kreedzt/rwr-hotkey-editor)
![build status](https://github.com/Kreedzt/rwr-hotkey-editor/actions/workflows/ci.yml/badge.svg?branch=master)
![rwr_version](https://badgen.net/badge/RWR/1.96/orange)

该工具可快速编辑游戏内热键文件: `hotkeys.xml`
Quick edit `hotkeys.xml` file tool

[English](README_en.md) | 简体中文
English | [简体中文](README_zhCN.md)

## 快速上手
## Quick Start
Download latest [Release](https://github.com/Kreedzt/rwr-hotkey-editor/releases), double-click exe to run app.

[Release](https://github.com/Kreedzt/rwr-hotkey-editor/releases) 页面下载最新的构建包, 双击使用即可
Available features:

当前应用包含如下功能:
- [x] Save by group
- [x] Quick overwrite

- [ ] 分组保存
- [ ] 快速覆盖
For `Windows 7` users, please [download](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section) webview2 runtime.

针对 `Windows 7` 用户, 请去 [官网](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section) 下载 `webview2` 运行时
## Development

## 开发

该项目是基于 [tauri](https://tauri.app/) 进行创建的项目, 同时依赖以下 2 个语言环境:
This project is based on [tauri](https://tauri.app/), depend on the following 2 language environments at the same time:

- [Nodejs](https://nodejs.org/en/)
- [Rust](https://www.rust-lang.org/)

在安装好环境后, 本项目依赖 `pnpm` 进行前端包管理
After installing the environment, this project relies on `pnpm` for front-end package management

1. 安装 `pnpm`
1. Install `pnpm`

```bash
npm i -g pnpm
```

2. 使用 `pnpm` 安装前端依赖包
2. Use `pnpm` install dependencies

```bash
pnpm i
```

3. 启动开发环境
3. Start development server

```
pnpm tauri dev
```

## 构建
## Build

参阅 [tauri](https://tauri.app/zh/v1/guides/building/) 文档, 使用如下命令构建:
Refer to the [tauri](https://tauri.app/zh/v1/guides/building/) documentation, and use the following command to build.

```bash
pnpm tauri build
```

## 协议
## License

- [GPLv3](https://opensource.org/licenses/GPL-3.0)


61 changes: 0 additions & 61 deletions README_en.md

This file was deleted.

61 changes: 61 additions & 0 deletions README_zhCN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# RWR 热键编辑器

[![codecov](https://codecov.io/gh/Kreedzt/rwr-hotkey-editor/branch/master/graph/badge.svg?token=MWGXZH7GO9)](https://codecov.io/gh/Kreedzt/rwr-hotkey-editor)
![build status](https://github.com/Kreedzt/rwr-hotkey-editor/actions/workflows/ci.yml/badge.svg?branch=master)
![rwr_version](https://badgen.net/badge/RWR/1.96/orange)

该工具可快速编辑游戏内热键文件: `hotkeys.xml`

[English](README.md) | 简体中文

## 快速上手

[Release](https://github.com/Kreedzt/rwr-hotkey-editor/releases) 页面下载最新的构建包, 双击使用即可

当前应用包含如下功能:

- [x] 分组保存
- [x] 快速覆盖

针对 `Windows 7` 用户, 请去 [官网](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section) 下载 `webview2` 运行时

## 开发

该项目是基于 [tauri](https://tauri.app/) 进行创建的项目, 同时依赖以下 2 个语言环境:

- [Nodejs](https://nodejs.org/en/)
- [Rust](https://www.rust-lang.org/)

在安装好环境后, 本项目依赖 `pnpm` 进行前端包管理

1. 安装 `pnpm`

```bash
npm i -g pnpm
```

2. 使用 `pnpm` 安装前端依赖包

```bash
pnpm i
```

3. 启动开发环境

```
pnpm tauri dev
```

## 构建

参阅 [tauri](https://tauri.app/zh/v1/guides/building/) 文档, 使用如下命令构建:

```bash
pnpm tauri build
```

## 协议

- [GPLv3](https://opensource.org/licenses/GPL-3.0)


6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
comment: # this is a top-level key
layout: " diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_base: false # [true :: must have a base report to post]
require_head: true # [true :: must have a head report to post]
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri"
"tauri": "tauri",
"test": "vitest",
"test:watch": "vitest --watch",
"coverage": "vitest --coverage"
},
"dependencies": {
"@emotion/react": "^11.10.8",
Expand Down Expand Up @@ -36,11 +39,14 @@
"@types/react-dom": "^18.0.6",
"@types/use-sync-external-store": "^0.0.6",
"@vitejs/plugin-react": "^3.0.0",
"@vitest/coverage-istanbul": "^1.0.1",
"@vitest/ui": "^1.0.1",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.23",
"prettier": "^2.8.7",
"tailwindcss": "^3.3.1",
"typescript": "^4.9.5",
"vite": "^4.2.1"
"vite": "^4.2.1",
"vitest": "^1.0.1"
}
}
Loading

0 comments on commit 91e7257

Please sign in to comment.