Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Lint & Test #470

Merged
merged 10 commits into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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') }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see any matrix.node above

- 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"
}
}