Skip to content

Commit

Permalink
修改code lint的执行时机
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Aug 29, 2023
1 parent 6a91d3e commit 903ca18
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 239 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/beta-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,41 @@ on:
- beta

jobs:
CheckCode:
name: Lint Code
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Cache file
uses: actions/cache@v3
with:
path: |
node_modules
$HOME/.cache/electron
$HOME/.cache/electron-builder
$HOME/.npm/_prebuilds
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: |
npm ci
- name: Lint src code
run: npm run lint

Windows:
name: Windows
runs-on: windows-latest
needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -101,6 +133,7 @@ jobs:
Mac:
name: Mac
runs-on: macos-latest
needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -158,6 +191,7 @@ jobs:
Linux:
name: Linux
runs-on: ubuntu-latest
needs: CheckCode
steps:
- name: Install package
run: sudo apt-get update && sudo apt-get install -y rpm libarchive-tools
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,41 @@ on:
- master

jobs:
CheckCode:
name: Lint Code
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16'

- name: Cache file
uses: actions/cache@v3
with:
path: |
node_modules
$HOME/.cache/electron
$HOME/.cache/electron-builder
$HOME/.npm/_prebuilds
key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: |
npm ci
- name: Lint src code
run: npm run lint

Windows:
name: Windows
runs-on: windows-latest
needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -58,6 +90,7 @@ jobs:
Mac:
name: Mac
runs-on: macos-latest
needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -104,6 +137,7 @@ jobs:
Linux:
name: Linux
runs-on: ubuntu-latest
needs: CheckCode
steps:
- name: Install package
run: sudo apt-get update && sudo apt-get install -y rpm libarchive-tools
Expand Down
10 changes: 5 additions & 5 deletions build-config/renderer-lyric/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ module.exports = {
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
// {
// test: /\.js$/,
// loader: 'babel-loader',
// exclude: /node_modules/,
// },
{
test: /\.tsx?$/,
exclude: /node_modules/,
Expand Down
10 changes: 5 additions & 5 deletions build-config/renderer-scripts/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ module.exports = {
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
// {
// test: /\.js$/,
// loader: 'babel-loader',
// exclude: /node_modules/,
// },
{
test: /\.tsx?$/,
exclude: /node_modules/,
Expand Down
10 changes: 5 additions & 5 deletions build-config/renderer/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ module.exports = {
},
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
// {
// test: /\.js$/,
// loader: 'babel-loader',
// exclude: /node_modules/,
// },
{
test: /\.tsx?$/,
exclude: /node_modules/,
Expand Down
Loading

0 comments on commit 903ca18

Please sign in to comment.