fix
Some checks failed
Gitea Actions Demo / setup (push) Successful in 34s
Gitea Actions Demo / Gitea-Actions (push) Failing after 36s
Gitea Actions Demo / build (push) Successful in 39s
Gitea Actions Demo / test (push) Successful in 41s

This commit is contained in:
seepine 2023-08-02 11:08:34 +08:00
parent 82198e8c5b
commit 8672113ba3
2 changed files with 36 additions and 52 deletions

View File

@ -0,0 +1,26 @@
name: 'Yarn install'
description: 'Run yarn install with cache enabled'
runs:
using: 'composite'
steps:
- name: Corepack enable
run: corepack enable
- name: Hash files
id: get-hash
uses: seepine/hash-files@v1
with:
patterns: |
**/package.json
**/yarn.lock
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }}
- name: Dependent installation
run: yarn install

View File

@ -16,24 +16,8 @@ jobs:
with:
fetch-depth: 1
- run: corepack enable
- name: Hash files
id: get-hash
uses: https://gitea.com/seepine/hash-files@v1
with:
patterns: |
**/package.json
**/yarn.lock
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }}
- name: Dependent installation
run: yarn install
- name: Yarn install
uses: ./.gitea/actions/yarn-install
test:
needs: setup
@ -48,24 +32,11 @@ jobs:
with:
fetch-depth: 1
- run: corepack enable
- name: Yarn install
uses: ./.gitea/actions/yarn-install
- name: Hash files
id: get-hash
uses: https://gitea.com/seepine/hash-files@v1
with:
patterns: |
**/package.json
**/yarn.lock
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }}
- name: Dependent installation
run: yarn install
- name: Eslint Test
run: npx eslint --ext ".vue,.js,.jsx,.ts,.tsx"
build:
needs: setup
@ -80,21 +51,8 @@ jobs:
with:
fetch-depth: 1
- run: corepack enable
- name: Yarn install
uses: ./.gitea/actions/yarn-install
- name: Hash files
id: get-hash
uses: https://gitea.com/seepine/hash-files@v1
with:
patterns: |
**/package.json
**/yarn.lock
- name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }}
- name: Dependent installation
run: yarn install
- name: Eslint Test
run: npx eslint --ext ".vue,.js,.jsx,.ts,.tsx"