From e05c5cf0177994929abf76594b02e69d144e6109 Mon Sep 17 00:00:00 2001 From: Dave Lockhart Date: Fri, 20 Nov 2020 14:59:07 -0500 Subject: [PATCH 1/2] switch to GitHub actions --- .github/workflows/ci.yml | 18 ++++++++++++++++++ .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 34 ---------------------------------- README.md | 9 ++++++--- autocomplete.js | 4 ++-- package.json | 4 +--- 6 files changed, 55 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..db49d0a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI +on: pull_request +jobs: + test: + timeout-minutes: 5 + runs-on: ubuntu-latest + steps: + - uses: Brightspace/third-party-actions@actions/checkout + - uses: Brightspace/third-party-actions@actions/setup-node + - name: Install dependencies + run: npm install + - name: Lint + run: npm run lint + - name: Unit Tests (SauceLabs) + run: npm run test:polymer:sauce + env: + SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY_DESIRE2LEARN }} + SAUCE_USERNAME: Desire2Learn diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..f6e4f42 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release +on: + push: + branches: + - master +jobs: + release: + if: "!contains(github.event.head_commit.message, 'skip ci')" + name: Release + timeout-minutes: 5 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: Brightspace/third-party-actions@actions/checkout + with: + persist-credentials: false + - name: Setup Node + uses: Brightspace/third-party-actions@actions/setup-node + - name: Install dependencies + run: npm install + - name: Unit Tests (Headless) + run: npm run test:polymer:local + - name: Semantic Release + uses: BrightspaceUI/actions/semantic-release@master + with: + GITHUB_TOKEN: ${{ secrets.D2L_GITHUB_TOKEN }} + NPM: true + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ab295bd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: node_js -node_js: node -addons: - chrome: stable -script: -- npm run lint -- | - if [ $TRAVIS_PULL_REQUEST != false ] && [ $TRAVIS_SECURE_ENV_VARS == true ]; then - echo "Pull request with secure environment variables, running Sauce tests..."; - npm run test:polymer:sauce || travis_terminate 1; - else - echo "Not a pull request and/or no secure environment variables, running headless tests..."; - npm run test:polymer:local || travis_terminate 1; - fi -after_success: -- frauci-update-version -d=skip && export TRAVIS_TAG=$(frauci-get-version) -env: - global: - - OWNER_NAME=BrightspaceUILabs - - REPO_NAME=autocomplete - - SAUCE_USERNAME: Gaudi1 - # SAUCE_ACCESS_KEY - - secure: fxPP+am1qWXmYZRXJl3I27bWqu/B14qXuwybbUC3bUqr7YjekXdllmMgH+aPYMtF1FDJl2WB9HooyLet7ubeKnJB49d9iMDEemciVsJJriRn5o+Hb5H4m97wU1I0Obw8EHb5nYy6KHIEoZIsmu1S9YQvXDPpUG1jqC8pWZ237n5rRwXs2tulczGg1Uun1hrVYHunjkg+hzlp13y4GEfKhA6UTtVv2OYNTcagQSDox/I6eVyGQIJ1s8Xfdn/uVw2feDYpvVVHfFMnCfhLsSZDZe11N3bl0ZXV31EqZ0Vf8z9+JYMvb3TsnTISwkLYHvrvVb2ywofsI5izWTI+3a2CPqzWhSC3BN476whJ4ZymBNQZiNea02nkBQrFJQL6iOXZ663NtFkqJc+jQcZQ7cCEkB14JKIQASnm71TqRaL/nEL/YMcO41A0V9bvHxRYet2t6YARY5KJuuhrl24wbgYyGayhvv3dy0o+NU77gYGScIOc+5YhZX3Z/tHPFZNrMieyxHilOpmeOaodRNnkdd6kw8RjrWjM1SDv9DcQQNDBUG3DMr4cahXSfRafZlYAjmdmv6Gs3GNQehb5nLtAz0/eyAirueZUQTvRSmpvPRa7pR70wE8RyUWoUQY13VZFVb8KPe1b5awDZpAdbWTrgHMOEZOaa+AaraUgan4EY0wT5Xg= - # GITHUB_RELEASE_TOKEN - - secure: xmDh7JpfEtPubuYzQhkeoAHYE+nN3He8ZWzKD8qw9pgSHW0S1NLmqduAmBLuL+Vh0N6OSfI6J69vu/2jgSB2sb4o46dYovvjm74msHbiDdNhStwvSm2i6Pl7Se+eyRB/dr7VAhIqp8mQ7H9wI8faS7zSn+iFT0VzS4ZPNBh4cqLuqequ0v5iW07aCEVmsn5jH/C4PvYBolRpwDSJRsHyC81HfQQG1k73Ls9q5vSUec84MM5zBdEgrO/o+4fPAmDgN4QppwCOIAz8t6Bruwdj/h7EAJJTwuhELwfph/Q3t4jh/KTPPboHDyWZdYsXB76b18isnEo57mYMeGljkHqEJpYwZbjf83GcleEuMIzFc0Ca1kQ+JYYCkerUYckgq6FNUUotkfYQgUvnhhIsGA//LirtTes9zmX7e3/MX7Vl1HD2optKM2ZeoPHOXmhvRreGFctaoP6ffSKONVPTyxS8PlzCsxNm1lkGpglwM/4XA+T0EG8u+ILvniKZp+/mTixOzrBs/qGep3mM6CPRkd3nzJrbuBIAmfS+5l9nq+90SxFhMD/NdzaKfPE62pdl/jap3o5b4H46oL4g8d7gBc1jGZ220Vtys4ufwGCWhpeau/5sa4kJpPzNIGkqRy+FJlWN1H8sPijk+/0OxGNzegjROUzAFK2g3NrgYvd5VUoSDgQ= -deploy: - provider: npm - email: d2ltravisdeploy@d2l.com - api_key: - # 40ad......7a38 - secure: wD9o+8u1BTQ+5MSJqtZuyhUJAjZkUh2mGDwMH8T3fF1yXALyzis7ZTlcrf8Z7mDMLkwxrLMWt5rhpvV3K5A7nEibxbWVN88jaqXiHpR1YsOwDNjdtF8eD511Ic6djA7NtWacLBfDOQAC1pWF+ruBZpaWRBBKCDRXVdVbLipBQoweTQuLm77SF3tz5Au5Xm1JlC7p7ePJvb8gCz8eucZzYf2kOlmG1Nyk99dibzCWuPRDVtdFMM8hDDQQuo06a2OzZPxxov3IkorjQ5KCc1BLOwLu2c7G8jZrRwObyM2DYA8I4oP09cVR1JCXIIRm6l1nE/K+PPLjauD1UglN7yJy0VaQRo/22LhJNPJpoWr31yHMr9FxYyyytGY6bC9oYMjBfrYUQaot/21z65LIZgYPS/4cg0fYW1uvIUNRG35VyTkSYxLmt2V4fP1P6YGIFoHhU41ZbhG4ZkRP6pIP3mJ+lnm1dq8eeB9J8N/KWiQWcabqsw8vXiv6WAFbCAS9XJfCUGH8xs9hBbJfdTsc2Zp5k5tX02qDYf/Qd+jgrBwTiS45wXgMeCu9Nondpp2UCPKBe3VRdqFOdT2hFf2bt7cBO+EAb5KJhq6iDtmh6xDD5dyQGEl2IJtU/Kb8+wb2J/YmblheCkd5okIbNYK2OVwoV774EYWK7pGwstTQGpvEvmI= - on: - tags: true - repo: BrightspaceUILabs/autocomplete diff --git a/README.md b/README.md index 0d06065..dba5c33 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # d2l-labs-autocomplete [![NPM version](https://img.shields.io/npm/v/@brightspace-ui-labs/autocomplete.svg)](https://www.npmjs.org/package/@brightspace-ui-labs/autocomplete) -[![Dependabot badge](https://flat.badgen.net/dependabot/BrightspaceUILabs/autocomplete?icon=dependabot)](https://app.dependabot.com/) -[![Build status](https://travis-ci.com/brightspaceUILabs/autocomplete.svg?branch=master)](https://travis-ci.com/brightspaceUILabs/autocomplete) +![Build status](https://github.com/BrightspaceUILabs/autocomplete/workflows/CI/badge.svg) > Note: this is a ["labs" component](https://github.com/BrightspaceUI/guide/wiki/Component-Tiers). While functional, these tasks are prerequisites to promotion to BrightspaceUI "official" status: > @@ -121,4 +120,8 @@ npm test All version changes should obey [semantic versioning](https://semver.org/) rules. -Include either `[increment major]`, `[increment minor]` or `[increment patch]` in your merge commit message to automatically increment the `package.json` version, create a tag, and trigger a deployment to NPM. +Releases use the [semantic-release](https://semantic-release.gitbook.io/) tooling and the [angular preset](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) for commit message syntax. Upon release, the version in `package.json` is updated, a tag and GitHub release is created and a new package will be deployed to NPM. + +Commits prefixed with `feat` will trigger a minor release, while `fix` or `perf` will trigger a patch release. A commit containing `BREAKING CHANGE` will cause a major release to occur. + +Other useful prefixes that will not trigger a release: `build`, `ci`, `docs`, `refactor`, `style` and `test`. More details in the [Angular Contribution Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type). diff --git a/autocomplete.js b/autocomplete.js index 6857a44..68e29f0 100644 --- a/autocomplete.js +++ b/autocomplete.js @@ -1,8 +1,8 @@ import { PolymerElement } from '@polymer/polymer/polymer-element.js'; import { Debouncer } from '@polymer/polymer/lib/utils/debounce.js'; -import 'd2l-dropdown/d2l-dropdown-content.js'; -import 'd2l-dropdown/d2l-dropdown.js'; import '@brightspace-ui/core/components/colors/colors.js'; +import '@brightspace-ui/core/components/dropdown/dropdown-content.js'; +import '@brightspace-ui/core/components/dropdown/dropdown.js'; import { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js'; import { timeOut } from '@polymer/polymer/lib/utils/async.js'; const $_documentContainer = document.createElement('template'); diff --git a/package.json b/package.json index 0f07b2a..6431463 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,6 @@ "eslint-config-brightspace": "^0.11.0", "eslint-plugin-html": "^6", "eslint-plugin-sort-class-members": "^1", - "frau-ci": "^1", "polymer-cli": "^1", "wct-browser-legacy": "^1" }, @@ -39,7 +38,6 @@ "main": "autocomplete.js", "dependencies": { "@brightspace-ui/core": "^1", - "@polymer/polymer": "^3", - "d2l-dropdown": "BrightspaceUI/dropdown#semver:^7" + "@polymer/polymer": "^3" } } From e59bdd7a2af34726f6a2ed65919e77ff4cfc7a06 Mon Sep 17 00:00:00 2001 From: Dave Lockhart Date: Fri, 20 Nov 2020 15:00:56 -0500 Subject: [PATCH 2/2] latest browsers --- wct.conf.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wct.conf.json b/wct.conf.json index 4b24fff..bc4a9f4 100644 --- a/wct.conf.json +++ b/wct.conf.json @@ -10,17 +10,17 @@ "browsers": [ { "browserName": "chrome", - "platform": "OS X 10.13", + "platform": "OS X 10.15", "version": "" }, { "browserName": "firefox", - "platform": "OS X 10.13", + "platform": "OS X 10.15", "version": "" }, { "browserName": "safari", - "platform": "OS X 10.13", + "platform": "OS X 10.15", "version": "" } ]