Skip to content

Commit 4ca7692

Browse files
committed
update PNPM lock and update github workflow
1 parent d812637 commit 4ca7692

File tree

2 files changed

+40
-26
lines changed

2 files changed

+40
-26
lines changed

.github/workflows/test_on_pr.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build Test for Pull Requests
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
unit_test_and_build_blog:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install pnpm
13+
uses: pnpm/action-setup@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 20
17+
cache: pnpm
18+
19+
- name: Configure Hexo Unit Test
20+
run: |
21+
git clone https://github.com/hexojs/hexo-theme-unit-test.git ~/unit_test
22+
mkdir -p ~/unit_test/themes/Anatolo
23+
cp -r ./* ~/unit_test/themes/Anatolo/
24+
cd ~/unit_test/themes/Anatolo
25+
pnpm i
26+
cd /home/runner/work/hexo-theme-anatolo/hexo-theme-anatolo
27+
cp ./.github/asserts/anatolo_config.yml ~/unit_test/themes/Anatolo/_config.yml
28+
cp ./.github/asserts/hexo_config.yml ~/unit_test/_config.yml
29+
cp ./.github/asserts/_posts/* ~/unit_test/source/_posts/
30+
cd ~/unit_test
31+
npm install
32+
npm install hexo-renderer-pug --save
33+
npm install hexo-renderer-stylus --save
34+
npx hexo new "Anatolo简介"
35+
cat /home/runner/work/hexo-theme-anatolo/hexo-theme-anatolo/README.md >> ./source/_posts/Anatolo简介.md
36+
37+
- name: Generate Test
38+
run: |
39+
cd ~/unit_test
40+
npx hexo g -b

pnpm-lock.yaml

-26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)