diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..7d7311b --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,42 @@ +name: Github CI +on: + pull_request: + branches: + - master + push: + branches: + - master +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Use Node.js 10.x + uses: actions/setup-node@v1 + with: + version: 10.x + + - name: Install + run: npm ci + + - name: ESLint + run: npx github-actions-eslint-annotator + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Test and report + env: + CC_TEST_REPORTER_ID: 5286fe366f9880c571dcdfe0d7748a6343eb7eb0788250626df792cd3120ab87 + GIT_BRANCH: ${{ github.ref }} + GIT_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} + NEO_CC_URL: https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 + NEO_CC: ./cc-test-reporter + SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} + SAUCE_ACCESS_TOKEN: ${{ secrets.SAUCE_ACCESS_TOKEN }} + run: | + ([[ -e $NEO_CC ]] || curl -L $NEO_CC_URL > $NEO_CC) && chmod +x $NEO_CC + $NEO_CC before-build + npm run test $([ -z "$SAUCE_ACCESS_KEY"] && echo "-- --skip-plugin sauce") + $NEO_CC after-build --exit-code $? diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6c7403a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -language: node_js -node_js: "lts/*" -dist: xenial - -addons: - firefox: latest - apt: - sources: - - google-chrome - packages: - - google-chrome-stable - -cache: - yarn: true - directories: - - node_modules - - .eslintcache - - $HOME/.cache/bower - - $HOME/cc - -env: - global: - - CC_TEST_REPORTER_ID=5286fe366f9880c571dcdfe0d7748a6343eb7eb0788250626df792cd3120ab87 - - SAUCE_USERNAME=nomego - - secure: j1R1meQnv2Gc9nk1v76q2DbDf1vThlA1DW/8fhySdit19/vESnn2bVPKlcnQA5AOsqgkR/lmcsOWaWV1FU4CD6jn6AWesRjLjYkZrqt+aXZ/l1dHTjrf0O9bF6zgif4lzAgwJCu5ADfRZYhrHX+jipqB/Elxl9UE95EXEs6XeCJbDtaUjamYlEnMAeoS188bs15BEudR+xRTggRBjFGRIhqKKGZ/vyGTK+0G0G9I8utgi2kF2zI8vypw2LgW+k2dcihl7vm4GsjfDFv+9toCzMw43nnMPE2Co/uoPDp9oqnW0NUdHjmY6b/RGX2IfJBEr6klOnCFbJHB67ERgYsuWybIlLJQA9ImSquYjw5R/VQ/Tpk7WZaeT7Q8Vbo2zHMVU2tmOyGzewXGHdvctSOAgB6Ky/53pmCNln2FT4QkyKZxQH3B0WlLdEWtiTMLf7k+yOlIgZ87/sMSnjd5SA2KjcCqK/3CHfBWZju6RbrjuAg0od/HOxFvpx7zz5vJI+RKL7wcD3Unz0BaL3Y6Ci8PJSTxqhl4L3rZXkUDxnLaET6shnxnrVBczrjaLbM+xh8K3utammZIzVmdyTXkR1FDqds2h+obxGZvdaIP574/UaC4j6lbFFLJ2fR/0hlQenifKnGhF9sW2FmH/69G8klKoE0mUHW5463m0/D0j4M0uPE= - - NEO_CC_URL=https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 - - NEO_CC=$HOME/cc/cc-test-reporter - - -before_script: - - yarn lint - - ([[ -e $NEO_CC ]] || curl -L $NEO_CC_URL > $NEO_CC) && chmod +x $NEO_CC - - $NEO_CC before-build -script: - - yarn test $([ -z "$SAUCE_ACCESS_KEY"] && echo "--skip-plugin sauce") - - $NEO_CC after-build --exit-code $TRAVIS_TEST_RESULT - -notifications: - slack: - secure: h7CJKsyJdZstrUUBuyRbWpXVpT5ZrDR8cnsRSoAWbpC37y7FQTtUR/70umVGphm5JlRuwxxeg2WASjgaToIYuwb/1G2CnwuVfitNl/SyxwAmyeFLkdmpG2VoV0PYs475x2Ta24tmSojAwmJhuHdVPE5SMyUdxcUcQpvfkHIlo9hizdfvdHMru38eDZBjnx8FDAX9a79qEtUDkUoN79GsoyO4qqxUjXqpMoY64OonyhIslgHbJmd+jUaTCnD9WqhS2PH6h0NBW2U/jw2G5hvWUDyex65I6PV6YAQt58bNH7yf+o+pkTDlq675LqrJZ1Wcf30U9QZiR74Su2bv6xUiY1pbnzf8MMV/mwKYKFU1MpNE/FV5JXhTMN3RYJ4udQ4weQVKoEob4wS7XYgrjBNJ9Wkl+Je+H1PgiYHAHEb5RVzVDtznSMqWBu/I13/sEj10JIJwEZMXtuZmRT1Kyatkhl38PKldPSQtR7H8rvT+tUeUvlDRWt3kpBwOPsiK5/XEDmxlu2TtMnX+MMARCNPfP/Z23dkHCPAdK3Sjc+IatZECOKFYH1Km2p8lnBEIrCKgFMqQH9WqUaM9DMaLVzHqP3S5NkuYYQUvBOQCM9tw/1115Z2AHTq1lR1oXBPO+RTFo/UL0S3ohw3UD+u+j53DOpLDIJjgp8NTvpjkTeeLiks= diff --git a/cosmoz-treenode.js b/cosmoz-treenode.js index 2d15d0c..db1f672 100644 --- a/cosmoz-treenode.js +++ b/cosmoz-treenode.js @@ -162,7 +162,6 @@ class CosmozTreenode extends ComputingLitElement { } _computePathText(pathToRender, valueProperty, pathSeparator) { - if (!pathToRender) { return ''; } diff --git a/package-lock.json b/package-lock.json index 29daa45..edb510d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -206,6 +206,15 @@ "from": "github:neovici/eslint-config#semver:^1.0.0", "dev": true }, + "@neovici/github-actions-eslint-annotator": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@neovici/github-actions-eslint-annotator/-/github-actions-eslint-annotator-0.1.2.tgz", + "integrity": "sha512-42ZL8wW3XqWlVhpua19jVEQIkn6/7JWcCqmEsz7sJqiV2mUFgwv19/JH7B9Uuxj5Xv68ZIGdiprRKJz3r3HN0w==", + "dev": true, + "requires": { + "eslint": "^5.15.1" + } + }, "@polymer/app-layout": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@polymer/app-layout/-/app-layout-3.1.0.tgz", diff --git a/package.json b/package.json index 122223b..294a5ed 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "4.0.1", "description": "[![Build Status](https://travis-ci.org/Neovici/cosmoz-treenode.svg?branch=master)](https://travis-ci.org/Neovici/cosmoz-treenode)", "keywords": [ - "polymer", + "lit-element", "web-components" ], "homepage": "https://github.com/neovici/cosmoz-treenode#readme", @@ -15,13 +15,12 @@ "url": "git+https://github.com/neovici/cosmoz-treenode.git" }, "license": "Apache-2.0", - "author": "", + "author": "Neovici dev", "main": "cosmoz-treenode.js", "directories": { "test": "test" }, "scripts": { - "analyze": "polymer analyze --input cosmoz-*.js > analysis.json", "lint": "eslint --cache --ext .js .", "preversion": "npm run lint && npm run test -- --skip-plugin sauce", "postversion": "git push && git push --tags", @@ -34,6 +33,7 @@ }, "devDependencies": { "@neovici/eslint-config": "github:neovici/eslint-config#semver:^1.0.0", + "@neovici/github-actions-eslint-annotator": "^0.1.2", "@polymer/iron-component-page": "^4.0.0", "@polymer/iron-demo-helpers": "^3.0.0", "@polymer/iron-test-helpers": "^3.0.0",