-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add typecheck && improve workflows
- Loading branch information
Showing
3 changed files
with
59 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,50 +18,58 @@ on: | |
- ".github/workflows/ci.yml" | ||
|
||
env: | ||
CI: true | ||
default_node_version: "lts/*" | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
version: 8 | ||
node-version: ${{env.default_node_version}} | ||
cache: pnpm | ||
|
||
- name: Install Dependencies | ||
run: pnpm i | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
- name: Lint | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
pnpm run lint | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
type: | ||
name: Type Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
path: | | ||
${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
node-version: ${{env.default_node_version}} | ||
cache: pnpm | ||
|
||
- name: Install Dependencies | ||
run: pnpm i | ||
|
||
- name: Lint | ||
run: | | ||
pnpm run lint | ||
pnpm run lint:type | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
|
||
test-ve: | ||
name: test-ve | ||
needs: build | ||
runs-on: ${{ matrix.os }} | ||
services: | ||
|
@@ -84,15 +92,13 @@ jobs: | |
with: | ||
name: artifact | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
if: ${{ matrix.pm == 'pnpm' }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
version: 8 | ||
node-version: ${{env.default_node_version}} | ||
|
||
- name: login to 'verdaccio' | ||
run: npx npm-cli-login -u test -p 1234 -e [email protected] -r http://localhost:4873 | ||
|
@@ -117,6 +123,7 @@ jobs: | |
${{ matrix.pm }} create hexo | ||
test-ln: | ||
name: test-ln | ||
needs: build | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
|
@@ -134,15 +141,13 @@ jobs: | |
with: | ||
name: artifact | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
if: ${{ matrix.pm == 'pnpm' }} | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
version: 8 | ||
node-version: ${{env.default_node_version}} | ||
|
||
- name: config for test | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters