Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
fix: migrate to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-sanare committed Jul 1, 2021
1 parent 6e1f192 commit edfdf9c
Show file tree
Hide file tree
Showing 10 changed files with 464 additions and 102 deletions.
120 changes: 120 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
install:
name: Install
runs-on: ubuntu-18.04

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm i


browserstack:
name: Browserstack
runs-on: ubuntu-18.04
if: github.ref == 'refs/heads/master'
needs: install

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Restore node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run Tests
if: github.ref == 'refs/heads/master'
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
run: npm start test.ci

validate:
name: Validate
runs-on: ubuntu-18.04
needs: install

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Restore node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Run Tests
run: npm start test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

release:
name: Release
runs-on: ubuntu-18.04
needs: [browserstack, validate]
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Restore node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node--${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-
# Release the Codes!!
- name: Release!
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm start semantic-release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ bower_components/
dist/
coverage/
npm-debug.log
local.log
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# ng-currency

[![NPM Version](https://img.shields.io/npm/v/ng-currency.svg?style=flat)](https://npmjs.org/package/ng-currency)
[![NPM Downloads](https://img.shields.io/npm/dm/ng-currency.svg?style=flat)](https://npmjs.org/package/ng-currency)
[![Travis](https://img.shields.io/travis/com/salte-io/ng-currency/master.svg?style=flat)](https://travis-ci.com/salte-io/ng-currency)
[![Coveralls](https://img.shields.io/coveralls/salte-io/ng-currency/master.svg)](https://coveralls.io/github/salte-io/ng-currency?branch=master)
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![CI Build][github-actions-image]][github-actions-url]
[![Coveralls][coveralls-image]][coveralls-url]

[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Greenkeeper badge](https://badges.greenkeeper.io/salte-io/ng-currency.svg)](https://greenkeeper.io)
[![semantic-release][semantic-release-image]][semantic-release-url]

> `ng-currency` has officially entered [maintenance mode](https://github.com/salte-io/ng-currency/issues/205).
Expand Down Expand Up @@ -146,3 +145,16 @@ angular.module('my-app', [
```html
<input type="text" ng-currency min="0" hard-cap="true" />
```

[npm-version-image]: https://img.shields.io/npm/v/ng-currency.svg?style=flat
[npm-downloads-image]: https://img.shields.io/npm/dm/ng-currency.svg?style=flat
[npm-url]: https://npmjs.org/package/ng-currency

[github-actions-image]: https://github.com/salte-io/ng-currency/actions/workflows/ci.yml/badge.svg?branch=master
[github-actions-url]: https://github.com/salte-io/ng-currency/actions/workflows/ci.yml

[coveralls-image]: https://img.shields.io/coveralls/salte-io/ng-currency/master.svg
[coveralls-url]: https://coveralls.io/github/salte-io/ng-currency

[semantic-release-url]: https://github.com/semantic-release/semantic-release
[semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
File renamed without changes.
44 changes: 8 additions & 36 deletions karma.ci.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,12 @@ const webpackConfig = require('./webpack.test.config.js');

module.exports = function(config) {
const customLaunchers = {
ChromeBeta: {
base: 'SauceLabs',
browserName: 'chrome',
version: 'beta'
},
Chrome: {
base: 'SauceLabs',
browserName: 'chrome'
},
Firefox: {
base: 'SauceLabs',
browserName: 'firefox'
},
Edge: {
base: 'SauceLabs',
browserName: 'microsoftedge'
},
Safari10: {
base: 'SauceLabs',
browserName: 'safari',
version: '10'
InternetExplorer11: {
base: 'BrowserStack',
browser: 'IE',
browser_version: '11',
os: 'Windows',
os_version: '10'
}
};

Expand All @@ -32,13 +17,7 @@ module.exports = function(config) {
frameworks: [
'mocha',
'sinon',
'polyfill'
],

polyfill: [
'Promise',
'fetch',
'URL'
'webpack'
],

files: [
Expand All @@ -56,10 +35,9 @@ module.exports = function(config) {
stats: 'errors-only'
},

reporters: ['mocha', 'saucelabs'],
reporters: ['mocha', 'BrowserStack'],

mochaReporter: {
output: 'minimal',
showDiff: true
},

Expand All @@ -69,12 +47,6 @@ module.exports = function(config) {

logLevel: config.LOG_INFO,

sauceLabs: {
testName: 'salte-io/ng-currency',
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
startConnect: true
},

customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),
captureTimeout: 0,
Expand Down
Loading

0 comments on commit edfdf9c

Please sign in to comment.