2020-08-15 01:51:14 +00:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-12-14 17:36:58 +00:00
|
|
|
node-version: [12, latest]
|
2020-08-15 01:51:14 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
2022-12-14 17:36:58 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-08-15 01:51:14 +00:00
|
|
|
with:
|
|
|
|
repository: hexojs/hexo-starter
|
2022-12-14 17:36:58 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-08-15 02:01:55 +00:00
|
|
|
with:
|
|
|
|
path: themes/icarus
|
2022-12-14 17:36:58 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-08-15 02:01:55 +00:00
|
|
|
with:
|
|
|
|
repository: SukkaLab/hexo-many-posts
|
|
|
|
path: source/_posts/hexo-many-posts
|
2022-12-14 17:36:58 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2020-08-15 01:51:14 +00:00
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2022-12-14 17:36:58 +00:00
|
|
|
- uses: actions/cache@v3
|
2020-08-15 01:51:14 +00:00
|
|
|
with:
|
|
|
|
path: node_modules
|
|
|
|
key: npm-cache
|
|
|
|
restore-keys: npm-cache
|
|
|
|
- run: npm install
|
2020-09-05 02:36:53 +00:00
|
|
|
- run: >
|
|
|
|
npm install $(node -e "const deps=require('./themes/icarus/package.json').dependencies;
|
|
|
|
console.log(Object.keys(deps).map(key=>key+'@'+deps[key]).join(' '));")
|
2020-08-15 02:16:50 +00:00
|
|
|
- run: npx hexo config theme icarus
|
2020-09-03 22:48:34 +00:00
|
|
|
- run: time NODE_ENV=production npx hexo g -b
|