mirror of https://github.com/curbengh/hexo-yam
feat(ci): run linux jobs using Bun
This commit is contained in:
parent
c964cfcf80
commit
dbed65ffeb
|
@ -7,10 +7,8 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js 16.x
|
- name: Install Bun
|
||||||
uses: actions/setup-node@v3
|
uses: oven-sh/setup-bun@v1
|
||||||
with:
|
|
||||||
node-version: "16.x"
|
|
||||||
- name: Cache NPM dependencies
|
- name: Cache NPM dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
@ -19,6 +17,6 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-npm-cache
|
${{ runner.os }}-npm-cache
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npm install
|
run: bun install
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: npm run lint
|
run: bun run lint
|
||||||
|
|
|
@ -3,22 +3,20 @@ name: Snyk
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
# Weekly
|
# Weekly
|
||||||
- cron: '0 0 * * 0'
|
- cron: "0 0 * * 0"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- 'dependabot/github_actions/github/codeql-action**'
|
- "dependabot/github_actions/github/codeql-action**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
security:
|
security:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Use Node.js 16.x
|
- name: Install Bun
|
||||||
uses: actions/setup-node@v3
|
uses: oven-sh/setup-bun@v1
|
||||||
with:
|
|
||||||
node-version: '16.x'
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npm install
|
run: bun install
|
||||||
- name: Run Snyk to check for vulnerabilities
|
- name: Run Snyk to check for vulnerabilities
|
||||||
uses: snyk/actions/node@master
|
uses: snyk/actions/node@master
|
||||||
continue-on-error: true # To make sure that SARIF upload gets called
|
continue-on-error: true # To make sure that SARIF upload gets called
|
||||||
|
|
|
@ -40,6 +40,8 @@ jobs:
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- name: Install Bun
|
||||||
|
uses: oven-sh/setup-bun@v1
|
||||||
- name: Cache NPM dependencies
|
- name: Cache NPM dependencies
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
|
@ -47,7 +49,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-npm-cache
|
key: ${{ runner.os }}-npm-cache
|
||||||
restore-keys: ${{ runner.os }}-npm-cache
|
restore-keys: ${{ runner.os }}-npm-cache
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npm install
|
run: bun install
|
||||||
- name: Coverage
|
- name: Coverage
|
||||||
run: npm run test
|
run: npm run test
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -4,3 +4,4 @@ package-lock.json
|
||||||
tmp/
|
tmp/
|
||||||
*.log
|
*.log
|
||||||
coverage/
|
coverage/
|
||||||
|
bun.lockb
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
[install]
|
||||||
|
optional = false
|
||||||
|
|
||||||
|
[install.lockfile]
|
||||||
|
save = false
|
Loading…
Reference in New Issue