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

Commit

Permalink
Merge pull request #86 from mocks-server/release
Browse files Browse the repository at this point in the history
Release v1.0.9
  • Loading branch information
javierbrea authored Dec 21, 2020
2 parents ba46d01 + f5bc48d commit f447cf0
Show file tree
Hide file tree
Showing 10 changed files with 167 additions and 66 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: build
on:
push:
branches:
- master
- release
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["12.19.0", "14.15.0", "15.2.0"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
id: extract-branch
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test unit
run: npm run test:unit
- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: coverage-${{ matrix.node }}
path: coverage
retention-days: 1
quality:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download test results
uses: actions/download-artifact@v2
with:
name: coverage-15.2.0
path: coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: SonarCloud Scan
if: env.SONAR_TOKEN != ''
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
44 changes: 44 additions & 0 deletions .github/workflows/check-package-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: check-package-version
on:
pull_request:
branches:
- master
jobs:
check-package-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get NPM version is new
id: check
uses: EndBug/version-check@v1.6.0
with:
diff-search: true
file-name: ./package.json
file-url: https://unpkg.com/@mocks-server/admin-api-paths@latest/package.json
static-checking: localIsNew
- name: Check version is new
if: steps.check.outputs.changed != 'true'
run: |
echo "Version not changed"
exit 1
- name: Get NPM version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.1.0
- name: Check Changelog version
id: changelog_reader
uses: mindsers/changelog-reader-action@v2.0.0
with:
version: ${{ steps.package-version.outputs.current-version }}
path: ./CHANGELOG.md
- name: Read version from Sonar config
id: sonar-version
uses: christian-draeger/read-properties@1.0.1
with:
path: './sonar-project.properties'
property: 'sonar.projectVersion'
- name: Check Sonar version
if: steps.sonar-version.outputs.value != steps.package-version.outputs.current-version
run: |
echo "Version not changed"
exit 1
20 changes: 20 additions & 0 deletions .github/workflows/publish-to-github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: publish-to-github
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci
- run: npm run build
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@mocks-server'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/publish-to-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: publish-to-npm
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org/'
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 0 additions & 2 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed
### Removed

## [1.0.9] - 2020-12-21

### Added
- chore(deps): Add support for Node.js v15.x

### Changed
- chore(ci): Migrate from Travis CI to github actions

## [1.0.8] - 2020-10-26
### Changed
- Update dependencies
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build status][travisci-image]][travisci-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Quality Gate][quality-gate-image]][quality-gate-url]
[![Build status][build-image]][build-url] [![Coverage Status][coveralls-image]][coveralls-url] [![Quality Gate][quality-gate-image]][quality-gate-url]

[![NPM dependencies][npm-dependencies-image]][npm-dependencies-url] [![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com) [![Last commit][last-commit-image]][last-commit-url] [![Last release][release-image]][release-url]

Expand Down Expand Up @@ -26,8 +26,8 @@ Please read the [contributing guidelines](.github/CONTRIBUTING.md) and [code of

[coveralls-image]: https://coveralls.io/repos/github/mocks-server/admin-api-paths/badge.svg
[coveralls-url]: https://coveralls.io/github/mocks-server/admin-api-paths
[travisci-image]: https://travis-ci.com/mocks-server/admin-api-paths.svg?branch=master
[travisci-url]: https://travis-ci.com/mocks-server/admin-api-paths
[build-image]: https://github.com/mocks-server/admin-api-paths/workflows/build/badge.svg?branch=master
[build-url]: https://github.com/mocks-server/admin-api-paths/actions?query=workflow%3Abuild+branch%3Amaster
[last-commit-image]: https://img.shields.io/github/last-commit/mocks-server/admin-api-paths.svg
[last-commit-url]: https://github.com/mocks-server/admin-api-paths/commits
[license-image]: https://img.shields.io/npm/l/@mocks-server/admin-api-paths.svg
Expand Down
55 changes: 1 addition & 54 deletions package-lock.json

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

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mocks-server/admin-api-paths",
"version": "1.0.8",
"version": "1.0.9",
"description": "Api paths of @mocks-server/plugin-admin-api",
"keywords": [
"mocks-server-plugin",
Expand All @@ -27,17 +27,14 @@
"lint": "eslint *.js test jest.config.js",
"lint-staged": "lint-staged",
"test": "jest",
"coveralls": "cat ./coverage/lcov.info | coveralls",
"test:coverage": "npm run test",
"test:ci": "npm run test"
"test:unit": "npm run test"
},
"devDependencies": {
"@babel/preset-env": "7.12.1",
"@rollup/plugin-babel": "5.2.1",
"@rollup/plugin-commonjs": "15.1.0",
"@rollup/plugin-node-resolve": "9.0.0",
"babel-jest": "26.6.1",
"coveralls": "3.0.9",
"eslint": "7.12.0",
"eslint-config-prettier": "6.14.0",
"eslint-plugin-prettier": "3.1.4",
Expand All @@ -59,6 +56,6 @@
}
},
"engines": {
"node": "12.x || 13.x || 14.x"
"node": "12.x || 14.x || 15.x"
}
}
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sonar.organization=mocks-server
sonar.projectKey=mocks-server-admin-api-paths
sonar.projectVersion=1.0.8
sonar.projectVersion=1.0.9

sonar.javascript.file.suffixes=.js
sonar.sourceEncoding=UTF-8
Expand Down

0 comments on commit f447cf0

Please sign in to comment.