Skip to content

Commit

Permalink
Merge branch 'main' of github.com:divergencetech/ethier into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ARR4N committed Dec 14, 2021
2 parents 55e47f8 + 4281bed commit 01dfe98
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 9 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Lint

on:
push:
pull_request:
workflow_dispatch:

jobs:
lint_go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2

- name: Check Go code formatting
run: test -z $(goimports -l .)

lint_sol:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup NodeJs
uses: actions/setup-node@v2
with:
node-version: 14.x

- name: Cache dependencies
id: cache
uses: actions/cache@v2
with:
path: ./node_modules
key: modules-${{ hashFiles('package-lock.json') }}

- name: Install npm dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts

- name: Check Solidity code formatting
run: npx prettier '**/*.sol' --check
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,3 @@ jobs:
- name: Run tests
run: npm run testverbose

- name: Check solidity code style
run: npx prettier '**/*.sol' --check

- name: Check go code style
run: test -z $(gofmt -l .)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![testing](https://github.com/divergencetech/ethier/actions/workflows/test.yml/badge.svg)
![lint](https://github.com/divergencetech/ethier/actions/workflows/lint.yml/badge.svg)

# Motivation

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"build": "go build -o build/ethier ethier/*.go",
"generate": "PATH=\"$(readlink -f build):${PATH}\" go generate ./...",
"testlight": "go test ./...",
"test": "go generate ./... && go test ./...",
"testverbose": "go generate ./... && go test ./... -test.v"
"test": "PATH=\"$(readlink -f build):${PATH}\" go generate ./... && go test ./...",
"testverbose": "PATH=\"$(readlink -f build):${PATH}\" go generate ./... && go test ./... -test.v"
},
"repository": {
"type": "git",
Expand All @@ -25,4 +25,4 @@
"prettier": "^2.5.1",
"prettier-plugin-solidity": "^1.0.0-beta.19"
}
}
}

0 comments on commit 01dfe98

Please sign in to comment.