Skip to content

Commit

Permalink
Misc fixes (#15)
Browse files Browse the repository at this point in the history
* fix: fix import path

* fix: fix release routine and version

* ci: add lint, clean artifacts & add release routine

* ci: revert coverage clean routine and remove reportDirectory option
  • Loading branch information
hoonoh authored Oct 29, 2019
1 parent fe85751 commit 7a60260
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 13 deletions.
59 changes: 59 additions & 0 deletions .azure-pipelines-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
trigger:
- next

jobs:
- job: Linux
pool:
vmImage: ubuntu-16.04
strategy:
matrix:
node_10_x:
node_version: 10.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: "Install Node.js $(node_version)"

- task: CacheBeta@0
inputs:
key: yarn | $(Agent.OS) | yarn.lock
path: $(YARN_CACHE_FOLDER)
displayName: Cache Yarn packages

- script: yarn --frozen-lockfile
displayName: "Install dependencies"

- script: yarn build
displayName: "Build"

- script: yarn lint
displayName: "Check linting"
condition: succeeded()

- script: yarn test:ci
displayName: "Run tests"
condition: succeeded()

- task: PublishTestResults@2
displayName: "Publish test results"
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: "junit.xml"
testRunTitle: "CI Tests $(Agent.OS)"

- task: PublishCodeCoverageResults@1
displayName: "Publish test coverage results"
condition: succeededOrFailed()
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(Build.SourcesDirectory)/coverage/cobertura-coverage.xml"

- script: yarn semantic-release || true
displayName: Release
condition: succeeded()

variables:
CI: true
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
9 changes: 4 additions & 5 deletions .azure-pipelines-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ steps:
- script: yarn build
displayName: "Build"

# Check linting
- script: yarn lint
displayName: "Check linting"

# Run test:ci
- script: yarn test:ci
displayName: "Run tests"
Expand All @@ -41,8 +45,3 @@ steps:
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(Build.SourcesDirectory)/coverage/cobertura-coverage.xml"
reportDirectory: "$(Build.SourcesDirectory)/coverage"

- script: yarn semantic-release || true
displayName: Release
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/next'))
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# 0.2.0 (https://github.com/hoonoh/aws-spot-price/compare/v0.1.0...v0.2.0) (2019-10-22)
# aws-spot-price changelog

# [0.3.0](https://github.com/hoonoh/aws-spot-price/compare/v0.2.0...v0.3.0) (2019-10-23)


# [0.2.0](https://github.com/hoonoh/aws-spot-price/compare/v0.1.0...v0.2.0) (2019-10-22)


### Features
Expand Down
18 changes: 12 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-spot-price",
"version": "0.2.0",
"version": "0.3.0",
"description": "CLI utility to list current global AWS EC2 Spot Instance prices.",
"keywords": [
"aws",
Expand Down Expand Up @@ -57,9 +57,6 @@
"jest": {
"preset": "ts-jest",
"testEnvironment": "node",
"reporters": [
"default"
],
"collectCoverageFrom": [
"src/**/*.ts"
],
Expand All @@ -76,12 +73,21 @@
[
"@semantic-release/changelog",
{
"changelogTitle": "aws-spot-price"
"changelogTitle": "# aws-spot-price changelog"
}
],
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
[
"@semantic-release/git",
{
"assets": [
"package.json",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion util/generate-spot-prices-mock-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { find, uniqWith, xorWith } from 'lodash';
import { resolve } from 'path';
import * as yargs from 'yargs';

import { defaultRegions, Region } from '../src/regions';
import { defaultRegions, Region } from '../src/constants/regions';

let allPrices: EC2.SpotPrice[] = [];

Expand Down

0 comments on commit 7a60260

Please sign in to comment.