-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed Mocha and nyc dependencies alongside with related config files. Introduced jest and adapted tests. Updated typescript to latest (with some other development dependencies). * Reduce line coverage threshold by 1% due to coverage tool differences * Add "text" coverage reporter * Use NodeJS v20 (LTS) * Update checkout and setup-node GitHub actions versions to newer --------- Co-authored-by: Dimitar Bounov <[email protected]>
- Loading branch information
1 parent
b7c0527
commit 6b3cb72
Showing
4 changed files
with
77 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,17 +9,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | ||
uses: actions/checkout@v4 # If you're using actions/checkout since v2 you must set persist-credentials to false in most cases for the deployment to work correctly. | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Install SSH Client 🔑 | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.DEPLOY_KEY }} | ||
- uses: actions/setup-node@v2-beta | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
node-version: 20 | ||
|
||
- name: Install and build the documentation🔧 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,86 @@ | ||
name: NodeJS CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
branches: ["master"] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
# See https://nodejs.org/en/about/releases/ | ||
node-version: [ 16.x ] | ||
strategy: | ||
matrix: | ||
# See https://nodejs.org/en/about/releases/ | ||
node-version: [20.x] | ||
|
||
env: | ||
SOL_AST_COMPILER_CACHE: ${{ github.workspace }}/.compiler_cache | ||
env: | ||
SOL_AST_COMPILER_CACHE: ${{ github.workspace }}/.compiler_cache | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use NodeJS ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
- name: Use NodeJS ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "npm" | ||
|
||
- name: Install and lint | ||
run: | | ||
npm install | ||
npm link | ||
npm run lint | ||
sol-ast-compile --version | ||
- name: Install and lint | ||
run: | | ||
npm install | ||
npm link | ||
npm run lint | ||
sol-ast-compile --version | ||
# See https://github.com/ethereum/solc-bin | ||
# See https://binaries.soliditylang.org/ | ||
# Also, remove list files and one rarely used compiler to still test downloading on-demand. | ||
- name: Pre-download compilers from historical builds archive | ||
run: | | ||
sol-ast-compile --download-compilers native wasm | ||
find $SOL_AST_COMPILER_CACHE -name 'list.json' -delete | ||
find $SOL_AST_COMPILER_CACHE -name '*v0.5.17*' -delete | ||
# See https://github.com/ethereum/solc-bin | ||
# See https://binaries.soliditylang.org/ | ||
# Also, remove list files and one rarely used compiler to still test downloading on-demand. | ||
- name: Pre-download compilers from historical builds archive | ||
run: | | ||
sol-ast-compile --download-compilers native wasm | ||
find $SOL_AST_COMPILER_CACHE -name 'list.json' -delete | ||
find $SOL_AST_COMPILER_CACHE -name '*v0.5.17*' -delete | ||
- name: Test and generate coverage report | ||
run: npm test | ||
- name: Test and generate coverage report | ||
run: npm test | ||
|
||
- name: Upload coverage to CodeCov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
name: codecov-umbrella | ||
directory: ./coverage/ | ||
fail_ci_if_error: true | ||
verbose: true | ||
- name: Upload coverage to CodeCov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
name: codecov-umbrella | ||
directory: ./coverage/ | ||
fail_ci_if_error: true | ||
verbose: true | ||
|
||
notify-slack: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- id: non_merge_commit_message | ||
run: echo "commit_message=$(git log --pretty=format:'%s' --no-merges -n 1)" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- name: Send slack Notification | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"project": "${{ github.repository }}", | ||
"env": "master", | ||
"version": "", | ||
"actor": "${{ github.triggering_actor }}", | ||
"commit_sha": "${{ github.sha }}", | ||
"commit_message": "${{ steps.non_merge_commit_message.outputs.commit_message }}", | ||
"commit_link": "${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}", | ||
"message": "" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_url }} | ||
notify-slack: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- id: non_merge_commit_message | ||
run: echo "commit_message=$(git log --pretty=format:'%s' --no-merges -n 1)" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- name: Send slack Notification | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"project": "${{ github.repository }}", | ||
"env": "master", | ||
"version": "", | ||
"actor": "${{ github.triggering_actor }}", | ||
"commit_sha": "${{ github.sha }}", | ||
"commit_message": "${{ steps.non_merge_commit_message.outputs.commit_message }}", | ||
"commit_link": "${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}", | ||
"message": "" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_url }} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
16.14.0 | ||
20.11.0 |