Skip to content

Fix for #272

Fix for #272 #251

Workflow file for this run

name: NodeJS CI
on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# See https://nodejs.org/en/about/releases/
node-version: [ 20.x ]
env:
SOL_AST_COMPILER_CACHE: ${{ github.workspace }}/.compiler_cache
steps:
- name: Checkout
uses: actions/checkout@v4
- 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
# 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: |
scribble --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 run test:ci
npm run coverage
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v4
with:
name: codecov-umbrella
directory: ./coverage/
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
notify-slack:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
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/slack-github-action@v1.23.0
with:
payload: |
{
"project": "${{ github.repository }}",
"env": "${{ github.ref_name }}",
"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 }}