Skip to content

Commit

Permalink
Fix solhint CI issue + use Node.js v16 in workflows (#59)
Browse files Browse the repository at this point in the history
* ci: remove global `-g` flag when installing solhint

* ci: (solhint) change nodejs version to 16.x

* ci: ➕ add solhint linter to `devDependency` + run as npm script

Do not install solhint linter globally on runner during CI

* ci: 📌 use Node.js version 16.x across all workflows
  • Loading branch information
CJ42 authored Nov 16, 2021
1 parent c0c9c2a commit 90daf63
Show file tree
Hide file tree
Showing 8 changed files with 600 additions and 33 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,16 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}

# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
- name: Use Node.js v16
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: "16.x"
cache: "npm"

- run: npm ci
- run: npm run build --if-present
- run: npm run generate-types
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
uses: EndBug/version-check@v1
id: check

- name: Use Node.js '14.16.0'
- name: Use Node.js v16
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v2
with:
node-version: "14.16.0"
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
scope: "@lukso"
cache: "npm"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-android-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
uses: EndBug/version-check@v1
id: check

- name: Use Node.js '14.16.0'
- name: Use Node.js v16
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v2
with:
node-version: "14.16.0"
node-version: "16.x"
cache: "npm"

- if: steps.check.outputs.changed == 'true'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-ios-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
uses: EndBug/version-check@v1
id: check

- name: Use Node.js '14.16.0'
- name: Use Node.js v16
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v2
with:
node-version: "14.16.0"
node-version: "16.x"
cache: "npm"

- if: steps.check.outputs.changed == 'true'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-npm-artifact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
uses: EndBug/version-check@v1
id: check

- name: Use Node.js '14.16.0'
- name: Use Node.js v16
if: steps.check.outputs.changed == 'true'
uses: actions/setup-node@v2
with:
node-version: "14.16.0"
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
scope: "@lukso"
cache: "npm"
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/solhint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Use Node.js '14.16.0'
- name: Use Node.js v16
uses: actions/setup-node@v2
with:
node-version: "14.16.0"
node-version: "16.x"
cache: "npm"

- run: npm ci

- name: solhint
run: |
npm install -g solhint
solhint 'contracts/**/*.sol'
- name: Run Solhint Linter on Smart Contracts
run: npm run linter
Loading

0 comments on commit 90daf63

Please sign in to comment.