Skip to content

Commit 17ba575

Browse files
author
Niko Lehtovirta
authored
chore: [MCA-946] Setup GitHub actions (#14)
Added github actions to run test and linter on every pull request and master commit
1 parent 8fc7474 commit 17ba575

7 files changed

Lines changed: 41 additions & 105 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @eliasvaltteri @henrinie @michalksiezuk-nc @jererobles @vastamaki @nikolauska @biphobe @ViktorHegyvari @aashirjaved @Nissinen @PerttuSavolainen @lintula @iriekun @terotil @katjajohanna
1+
* @eliasvaltteri @henrinie @jererobles @nikolauska @biphobe @PerttuSavolainen @lintula @iriekun @Ben3eeE @BoRuDar

.github/workflows/nodejs.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/on_pr_master.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test & Lint
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
linter:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [12.x, 14.x]
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v1
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
- run: npm ci
22+
- run: npm run lint
23+
24+
test:
25+
runs-on: ubuntu-latest
26+
strategy:
27+
matrix:
28+
node-version: [12.x, 14.x]
29+
steps:
30+
- uses: actions/checkout@v2
31+
- name: Use Node.js ${{ matrix.node-version }}
32+
uses: actions/setup-node@v1
33+
with:
34+
node-version: ${{ matrix.node-version }}
35+
- run: npm ci
36+
- run: npm run test

bitbucket-pipelines.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

package-lock.json

Lines changed: 0 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"assets/**/*"
1515
],
1616
"scripts": {
17-
"test": "ava",
17+
"test": "ava --verbose --timeout=2m",
1818
"lint": "eslint . --ext ts",
1919
"lint:fix": "eslint . --ext ts --fix",
2020
"start": "tsc -w -p .",
@@ -44,10 +44,7 @@
4444
"@typescript-eslint/parser": "^2.20.0",
4545
"ava": "^3.3.0",
4646
"eslint": "^6.8.0",
47-
"eslint-config-prettier": "^6.10.0",
4847
"eslint-plugin-import": "^2.20.1",
49-
"eslint-plugin-prettier": "^3.1.2",
50-
"prettier": "^1.19.1",
5148
"standard-version": "^9.0.0",
5249
"ts-node": "^8.6.2",
5350
"typescript": "^3.7.5"
@@ -60,17 +57,9 @@
6057
"extends": [
6158
"eslint:recommended",
6259
"plugin:@typescript-eslint/eslint-recommended",
63-
"plugin:@typescript-eslint/recommended",
64-
"plugin:prettier/recommended"
60+
"plugin:@typescript-eslint/recommended"
6561
]
6662
},
67-
"prettier": {
68-
"semi": true,
69-
"trailingComma": "all",
70-
"singleQuote": true,
71-
"printWidth": 120,
72-
"tabWidth": 2
73-
},
7463
"ava": {
7564
"extensions": [
7665
"ts"

src/lib/aws-sdk/cloudwatch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { match } from '../utils';
66
export async function getCloudWatchAlarms(
77
include?: string[],
88
exclude?: string[],
9-
): Promise<{ metricAlarms: AWS.CloudWatch.MetricAlarms, compositeAlarms: AWS.CloudWatch.CompositeAlarms }> {
9+
): Promise<{ metricAlarms: AWS.CloudWatch.MetricAlarms; compositeAlarms: AWS.CloudWatch.CompositeAlarms }> {
1010
validateCredentials();
1111

1212
const cw = new AWS.CloudWatch();
@@ -28,7 +28,7 @@ export async function getCloudWatchAlarms(
2828
return {
2929
metricAlarms: metricAlarms.filter(alarm => match(alarm.AlarmName || '', include || [], exclude || [])),
3030
compositeAlarms: compositeAlarms.filter(alarm => match(alarm.AlarmName || '', include || [], exclude || [])),
31-
}
31+
};
3232
}
3333

3434
export async function getCloudWatchMetricAlarms(

0 commit comments

Comments
 (0)