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

switch to GitHub actions #36

Merged
merged 2 commits into from
Nov 20, 2020
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
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release
on:
push:
branches:
- master
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this have the other branches because it does publish to npm (I think I missed this in another PR today...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't been adding it for anything except core and Intl. I think it'll be suuuuuuper rare to ever care about release branches for these. I figure we can always add that support later? 🤷

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah it's probably not common, I've had to do it a few times for facet-filter-sort but it doesn't publish to npm yet. I think it depends how active development is on a labs component. But we can definitely always add it later

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 }}
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:
>
Expand Down Expand Up @@ -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).
4 changes: 2 additions & 2 deletions autocomplete.js
Original file line number Diff line number Diff line change
@@ -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';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seemed like an easy fix to do at the same time -- these are directly aliased from those old d2l-dropdown files.

import { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js';
import { timeOut } from '@polymer/polymer/lib/utils/async.js';
const $_documentContainer = document.createElement('template');
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,13 @@
"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"
},
"version": "2.0.2",
"main": "autocomplete.js",
"dependencies": {
"@brightspace-ui/core": "^1",
"@polymer/polymer": "^3",
"d2l-dropdown": "BrightspaceUI/dropdown#semver:^7"
"@polymer/polymer": "^3"
}
}
6 changes: 3 additions & 3 deletions wct.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
}
]
Expand Down