Skip to content

Commit

Permalink
Merge pull request #856 from mobi/dev
Browse files Browse the repository at this point in the history
v1.14
  • Loading branch information
grahamhency authored Nov 24, 2021
2 parents e9492c2 + e4dc5dd commit ef6ced8
Show file tree
Hide file tree
Showing 16 changed files with 290 additions and 36 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## PR Checklist
Please check if your PR fulfills the following requirements:
<!-- Please check all that apply using "x". -->
- [ ] The commit message follows our [guidelines](https://github.com/mobi/goponents/blob/master/CONTRIBUTING.md)
- [ ] The commit message follows our [guidelines](https://github.com/mobi/goponents/blob/main/CONTRIBUTING.md)
- [ ] Tests for the changes have been added
- [ ] Docs have been added or updated

Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CD

on:
push:
branches:
- main

jobs:
createRelease:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Package Version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
with:
path: projects/go-lib
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.package-version.outputs.current-version }}
release_name: v${{ steps.package-version.outputs.current-version }}
generate_release_notes: true
publishPackage:
name: Publish New Package
runs-on: ubuntu-latest
needs: createRelease
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: npm-${{ hashFiles('package-lock.json') }}
- name: Read .nvmrc
run: echo NVMRC=`cat .nvmrc` >> $GITHUB_ENV
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.NVMRC }}
registry_url: "https://registry.npmjs.org"
- name: Install npm Packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Publish Package
run: npm run publish
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on: [pull_request]

concurrency:
group: ci_${{ github.head_ref }}
cancel-in-progress: true

jobs:
library:
name: Library Build & Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: library-npm-${{ hashFiles('package-lock.json') }}
- name: Read .nvmrc
run: echo NVMRC=`cat .nvmrc` >> $GITHUB_ENV
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.NVMRC }}
- name: Install npm Packages
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Run Production Build
run: npm run build_lib
- name: Run Tests
run: npm run test_lib:ci
- name: Run Tests & Upload Coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: ${{github.workspace}}/projects/coverage/lcov.info:lcov
36 changes: 36 additions & 0 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Version Check

on:
pull_request:
branches:
- main

concurrency:
group: version_check_${{ github.head_ref }}
cancel-in-progress: true

jobs:
checkVersion:
name: Validate New Version
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v2
with:
ref: main
- name: Get Current Package Version
id: package-version-current
uses: martinbeentjes/npm-get-version-action@master
with:
path: projects/go-lib
- uses: actions/checkout@v2
- name: Get New Package Version
id: package-version-new
uses: martinbeentjes/npm-get-version-action@master
with:
path: projects/go-lib
- name: Ensure New Version
if: steps.package-version-current.outputs.current-version == steps.package-version-new.outputs.current-version
uses: actions/github-script@v3
with:
script: core.setFailed('Package version has not be incremented!')
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
/.sass-cache
/connect.lock
/coverage
/projects/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10.16.3
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Contribution Guide
_**Note:** The guide for contributing to this repo is based on the [contribution guide for Angular](https://github.com/angular/angular/blob/master/CONTRIBUTING.md) itself. Parts of this guide were taken verbatim and were originally written by many [fine Angular contributors](https://github.com/angular/angular/blame/master/CONTRIBUTING.md)_
_**Note:** The guide for contributing to this repo is based on the [contribution guide for Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md) itself. Parts of this guide were taken verbatim and were originally written by many [fine Angular contributors](https://github.com/angular/angular/blame/main/CONTRIBUTING.md)_

## Code of Conduct
Please read and follow our [Code of conduct](https://github.com/mobi/goponents/blob/master/CODE_OF_CONDUCT.md).
Please read and follow our [Code of conduct](https://github.com/mobi/goponents/blob/main/CODE_OF_CONDUCT.md).

## Feature requests
You can request a new feature by submitting an issue to our [GitHub Repository](https://github.com/mobi/goponents/issues). If you would like to _implement_ a new feature, please submit an issue with a proposal for your work first.
Expand Down Expand Up @@ -46,7 +46,7 @@ Before you submit your pull request (PR) consider the following guidelines:
git push origin my-branch-name
```
9. In GitHub, send a pull request to `goponents:dev`.
- Please format the description of your PR with our [pull request template](https://github.com/mobi/goponents/blob/master/.github/PULL_REQUEST_TEMPLATE.md)
- Please format the description of your PR with our [pull request template](https://github.com/mobi/goponents/blob/main/.github/PULL_REQUEST_TEMPLATE.md)
- If we suggest changes then:
1. Make the required updates.
2. Re-run the test suite to ensure tests are still passing.
Expand Down
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Goponents
![CI](https://github.com/mobi/goponents/actions/workflows/ci.yml/badge.svg)
[![Maintainability](https://api.codeclimate.com/v1/badges/51dc6df26aa65c6d11b9/maintainability)](https://codeclimate.com/github/mobi/goponents/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/51dc6df26aa65c6d11b9/test_coverage)](https://codeclimate.com/github/mobi/goponents/test_coverage)
[![Netlify Status](https://api.netlify.com/api/v1/badges/b4506f44-16c0-4852-9b75-3c89196e7216/deploy-status)](https://app.netlify.com/sites/goponents/deploys)

###### Currently `v1.13.2`
# Goponents

This project houses a set of UI components for Angular 7+ and designed around the 'Go' design system.

# Getting Started

1. Take a look at our [code of conduct](https://github.com/mobi/goponents/blob/master/CODE_OF_CONDUCT.md)
2. Read through our [contribution guidelines](https://github.com/mobi/goponents/blob/master/CONTRIBUTING.md)
1. Take a look at our [code of conduct](https://github.com/mobi/goponents/blob/main/CODE_OF_CONDUCT.md)
2. Read through our [contribution guidelines](https://github.com/mobi/goponents/blob/main/CONTRIBUTING.md)
3. Install the latest version of npm

```bash
Expand Down Expand Up @@ -48,15 +51,15 @@ The project is separated up into four project directories.

### go-lib

[projects/go-lib](https://github.com/mobi/goponents/tree/master/projects/go-lib) is where all of our production components, services, and other items are built out. If you are adding that you would like to distribute, this is where you will do that work.
[projects/go-lib](https://github.com/mobi/goponents/tree/main/projects/go-lib) is where all of our production components, services, and other items are built out. If you are adding that you would like to distribute, this is where you will do that work.

The components are located [here](https://github.com/mobi/goponents/tree/master/projects/go-lib/src/lib/components):
The components are located [here](https://github.com/mobi/goponents/tree/main/projects/go-lib/src/lib/components):

```bash
projects/go-lib/src/lib/components
```

The styles are located [here](https://github.com/mobi/goponents/tree/master/projects/go-lib/src/lib/styles):
The styles are located [here](https://github.com/mobi/goponents/tree/main/projects/go-lib/src/lib/styles):

```bash
projects/go-lib/src/lib/styles
Expand All @@ -66,9 +69,9 @@ You can build this project by running `npm run build_lib`

### go-style-guide

[projects/go-style-guide](https://github.com/mobi/goponents/tree/master/projects/go-style-guide) is separate app contains all of the documentation for the styles and usage of all the components and available styles in the `go-lib` project.
[projects/go-style-guide](https://github.com/mobi/goponents/tree/main/projects/go-style-guide) is separate app contains all of the documentation for the styles and usage of all the components and available styles in the `go-lib` project.

The base style guide app is located [here](https://github.com/mobi/goponents/tree/master/projects/go-style-guide/src/app);
The base style guide app is located [here](https://github.com/mobi/goponents/tree/main/projects/go-style-guide/src/app);

```bash
projects/go-style-guide/src/app
Expand All @@ -78,9 +81,9 @@ You can start this project by running `npm run style_guide`

### go-tester

[projects/go-tester](https://github.com/mobi/goponents/tree/master/projects/go-tester) is separate app that allows us to test the implementation of our components as we build them out. If you want to test to make sure your go-lib components work as expected in a more real world setting, this is where you will do that work.
[projects/go-tester](https://github.com/mobi/goponents/tree/main/projects/go-tester) is separate app that allows us to test the implementation of our components as we build them out. If you want to test to make sure your go-lib components work as expected in a more real world setting, this is where you will do that work.

The base tester app is located [here](https://github.com/mobi/goponents/tree/master/projects/go-tester/src/app);
The base tester app is located [here](https://github.com/mobi/goponents/tree/main/projects/go-tester/src/app);

```bash
projects/go-tester/src/app
Expand All @@ -90,7 +93,7 @@ You can start this project by running `npm run tester`

### go-tester-e2e

[projects/go-tester-e2e](https://github.com/mobi/goponents/tree/master/projects/go-tester-e2e) will eventually be where we will write all of our end to end testing for our go-tester app. We have not yet done this, but we would welcome any [contributions](https://github.com/mobi/goponents/blob/master/CONTRIBUTING.md).
[projects/go-tester-e2e](https://github.com/mobi/goponents/tree/main/projects/go-tester-e2e) will eventually be where we will write all of our end to end testing for our go-tester app. We have not yet done this, but we would welcome any [contributions](https://github.com/mobi/goponents/blob/main/CONTRIBUTING.md).

# Other Useful Things

Expand Down
114 changes: 114 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ef6ced8

Please sign in to comment.