Skip to content

Commit 46551b4

Browse files
CI: Lint & Test (#470)
* 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 <mattia.richetto@gmail.com>
1 parent 9f8e549 commit 46551b4

File tree

6 files changed

+99
-146
lines changed

6 files changed

+99
-146
lines changed

.github/workflows/CI.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: 12
19+
- uses: actions/checkout@v2
20+
- uses: actions/cache@v2
21+
id: cache
22+
with:
23+
path: |
24+
node_modules
25+
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
26+
- name: Install
27+
run: npm install
28+
- name: lint
29+
run: npm run lint
30+
31+
test_linux:
32+
name: Test on Linux with Node ${{ matrix.node }}
33+
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
node: [12, 14, 15]
37+
steps:
38+
- uses: actions/setup-node@v1
39+
with:
40+
node-version: ${{ matrix.node }}
41+
- uses: actions/checkout@v2
42+
- uses: actions/cache@v2
43+
id: cache
44+
with:
45+
path: |
46+
node_modules
47+
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
48+
- name: Install
49+
run: npm install
50+
- name: Run tests
51+
run: npm run test:all
52+
53+
test_macos:
54+
name: Test on MacOS with Node 12
55+
runs-on: macos-latest
56+
steps:
57+
- uses: actions/setup-node@v1
58+
with:
59+
node-version: 12
60+
- uses: actions/checkout@v2
61+
- uses: actions/cache@v2
62+
id: cache
63+
with:
64+
path: |
65+
node_modules
66+
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
67+
- name: Install
68+
run: npm install
69+
- name: Run tests
70+
run: npm run test:all
71+
72+
test_windows:
73+
name: Test on Windows with Node 12
74+
runs-on: windows-latest
75+
steps:
76+
- uses: actions/setup-node@v1
77+
with:
78+
node-version: 12
79+
- uses: actions/checkout@v2
80+
- name: Install
81+
run: npm install
82+
- name: Run tests
83+
run: npm run test:all

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# prettier-plugin-solidity
22

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

codecov.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

package-lock.json

Lines changed: 12 additions & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
"description": "prettier plugin for solidity",
55
"main": "src",
66
"scripts": {
7-
"coverage": "codecov",
87
"eslint": "eslint 'scripts/**' 'src/**' '__tests__/**' 'tests/**'",
9-
"generateindexes": "SCRIPT=true node scripts/generateIndexes.js",
8+
"generateindexes": "cross-env SCRIPT=true node scripts/generateIndexes.js",
109
"lint": "npm run eslint && npm run prettier -- --list-different",
1110
"lint:fix": "npm run eslint -- --fix && npm run prettier -- --write",
1211
"prettier": "prettier './*.{js,json,md,yml}' '{scripts,src,__tests__,tests}/**/*.js'",
1312
"test": "jest",
14-
"test:all": "FULL_TEST=1 jest"
13+
"test:all": "cross-env FULL_TEST=1 jest"
1514
},
1615
"repository": {
1716
"type": "git",
@@ -62,7 +61,7 @@
6261
"node": ">=12"
6362
},
6463
"devDependencies": {
65-
"codecov": "^3.8.1",
64+
"cross-env": "^7.0.3",
6665
"eslint": "^7.23.0",
6766
"eslint-config-airbnb-base": "^14.2.1",
6867
"eslint-config-prettier": "^8.1.0",
@@ -81,7 +80,7 @@
8180
"escape-string-regexp": "^4.0.0",
8281
"prettier": "^2.2.1",
8382
"semver": "^7.3.5",
84-
"solidity-comments-extractor": "^0.0.5",
83+
"solidity-comments-extractor": "^0.0.6",
8584
"string-width": "^4.2.0"
8685
}
8786
}

0 commit comments

Comments
 (0)