Skip to content

Commit

Permalink
Add GH Actions workflow to build PR (redhat-developer#299)
Browse files Browse the repository at this point in the history
* redhat-developer#295 add GH Actions workflow to build PR

Signed-off-by: Yevhen Vydolob <[email protected]>

* use 'yarn', add Coveralls step

Signed-off-by: Yevhen Vydolob <[email protected]>

* Fix Coveralls

Signed-off-by: Yevhen Vydolob <[email protected]>

* Fix coveralls again

Signed-off-by: Yevhen Vydolob <[email protected]>

* Set ubuntu-latest, use proper script to run coveralls

Signed-off-by: Yevhen Vydolob <[email protected]>

* Configure prettier to use always 'lf'

Signed-off-by: Yevhen Vydolob <[email protected]>

* Set 'endOfLine' to auto

Signed-off-by: Yevhen Vydolob <[email protected]>
  • Loading branch information
evidolob authored Aug 12, 2020
1 parent a1fb29f commit e30a8a0
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 5 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This is a basic workflow

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master]
pull_request:
branches: [master]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Set up Node
- name: Use Node 12
uses: actions/setup-node@v1
with:
node-version: 12

# Run install dependencies
- name: Install dependencies
run: yarn

# Build extension
- name: Run build
run: yarn build

# Run tests
- name: Run Test
uses: GabrielBB/[email protected]
with:
run: yarn coveralls

# Run Coveralls
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ npm-debug.log
out/server
.DS_Store
yarn-error.log
coverage
4 changes: 3 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"arrowParens": "always",
"printWidth": 130,
"singleQuote": true,
"trailingComma": "es5"
"trailingComma": "es5",
"endOfLine": "auto"
}
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ before_install:
install:
- yarn install
- yarn run build
after_script:
- yarn run coveralls
deploy:
provider: npm
email: [email protected]
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"watch": "tsc --watch -p .",
"test": "mocha --require ts-node/register --ui tdd ./test/*.test.ts",
"coverage": "nyc mocha --require ts-node/register --require source-map-support/register --recursive --ui tdd ./test/*.test.ts",
"coveralls": "nyc yarn test && nyc report --reporter=text-lcov | coveralls",
"coveralls": "nyc --reporter=lcov --reporter=text mocha --require ts-node/register --require source-map-support/register --recursive --ui tdd ./test/*.test.ts",
"lint": "eslint -c .eslintrc.js --ext .ts src test",
"prettier-fix": "yarn prettier --write .",
"build": "yarn clean && yarn lint && yarn compile"
Expand All @@ -79,7 +79,9 @@
"exclude": [
"**/*.d.ts",
"test/",
"out"
"out",
"coverage/",
".eslintrc.js"
],
"all": true
}
Expand Down

0 comments on commit e30a8a0

Please sign in to comment.