This repository has been archived by the owner on Mar 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from mocks-server/release
Release v1.3.7
- Loading branch information
Showing
42 changed files
with
620 additions
and
492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
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: Test E2E | ||
run: npm run test:e2e | ||
id: test-e2e | ||
- 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/plugin-inquirer-cli@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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: publish-to-github | ||
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://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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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 publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.