Skip to content

Commit 07a77f6

Browse files
authored
optimize the workflow file
1 parent ad21571 commit 07a77f6

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/eslint.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ jobs:
1111
eslint:
1212
runs-on: ubuntu-22.04
1313
steps:
14-
- name: clone-branch
15-
run: |
16-
git clone https://github.com/Defirence/javascript.git
17-
pwd && ls -lash
18-
- name: eslint
19-
run: |
20-
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install curl -y
21-
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
22-
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
23-
sudo apt-get install yarn -y
24-
yarn --version
25-
yarn install && yarn audit && npx eslint webserver.js
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Node.js and Yarn
18+
uses: actions/setup-node@v3
19+
with:
20+
node-version: '16'
21+
cache: 'yarn'
22+
23+
- name: Install dependencies
24+
run: yarn install
25+
26+
- name: Run ESLint
27+
run: npx eslint .

0 commit comments

Comments
 (0)