Skip to content

Commit

Permalink
CI: Lint & Test (#470)
Browse files Browse the repository at this point in the history
* Remove travis and use GH actions

* Upgrade solidity-comments-extractor

* Use test:all script in CI

* Add cross-env in scripts

* remove codecov

* update readme

* remove node 10

* alphaorderftw

* Remove unnecessary matrix.node

* Remove vyper installation

Co-authored-by: mattia richetto <[email protected]>
  • Loading branch information
fvictorio and mattiaerre authored Apr 12, 2021
1 parent 9f8e549 commit 46551b4
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 146 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- '*'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install
run: npm install
- name: lint
run: npm run lint

test_linux:
name: Test on Linux with Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14, 15]
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
- name: Install
run: npm install
- name: Run tests
run: npm run test:all

test_macos:
name: Test on MacOS with Node 12
runs-on: macos-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install
run: npm install
- name: Run tests
run: npm run test:all

test_windows:
name: Test on Windows with Node 12
runs-on: windows-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/checkout@v2
- name: Install
run: npm install
- name: Run tests
run: npm run test:all
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# prettier-plugin-solidity

[![Build Status](https://travis-ci.com/prettier-solidity/prettier-plugin-solidity.svg?branch=master)](https://travis-ci.com/prettier-solidity/prettier-plugin-solidity)
[![codecov](https://codecov.io/gh/prettier-solidity/prettier-plugin-solidity/branch/master/graph/badge.svg)](https://codecov.io/gh/prettier-solidity/prettier-plugin-solidity)
[![Telegram](/assets/telegram-badge.svg)](https://t.me/joinchat/Je2WJFCfKJ_mht1XdhBh6w)
[![Twitter Follow](https://img.shields.io/twitter/follow/PrettierSol.svg?style=social)](https://twitter.com/PrettierSol)

Expand Down
2 changes: 0 additions & 2 deletions codecov.yml

This file was deleted.

139 changes: 12 additions & 127 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"description": "prettier plugin for solidity",
"main": "src",
"scripts": {
"coverage": "codecov",
"eslint": "eslint 'scripts/**' 'src/**' '__tests__/**' 'tests/**'",
"generateindexes": "SCRIPT=true node scripts/generateIndexes.js",
"generateindexes": "cross-env SCRIPT=true node scripts/generateIndexes.js",
"lint": "npm run eslint && npm run prettier -- --list-different",
"lint:fix": "npm run eslint -- --fix && npm run prettier -- --write",
"prettier": "prettier './*.{js,json,md,yml}' '{scripts,src,__tests__,tests}/**/*.js'",
"test": "jest",
"test:all": "FULL_TEST=1 jest"
"test:all": "cross-env FULL_TEST=1 jest"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -62,7 +61,7 @@
"node": ">=12"
},
"devDependencies": {
"codecov": "^3.8.1",
"cross-env": "^7.0.3",
"eslint": "^7.23.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.1.0",
Expand All @@ -81,7 +80,7 @@
"escape-string-regexp": "^4.0.0",
"prettier": "^2.2.1",
"semver": "^7.3.5",
"solidity-comments-extractor": "^0.0.5",
"solidity-comments-extractor": "^0.0.6",
"string-width": "^4.2.0"
}
}

0 comments on commit 46551b4

Please sign in to comment.