Skip to content

Commit c3ea650

Browse files
committed
Add github action workflows
1 parent da0a111 commit c3ea650

File tree

9 files changed

+10464
-5506
lines changed

9 files changed

+10464
-5506
lines changed

.eslintrc.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint'],
4+
extends: [
5+
'eslint:recommended',
6+
'plugin:@typescript-eslint/recommended',
7+
],
8+
rules: {
9+
// add any custom rules here
10+
},
11+
};

.github/.workflows/lint.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Use Docker Compose
16+
uses: docker/compose-action@v2
17+
with:
18+
compose-file: docker-compose.yml
19+
20+
- name: Run Jest tests
21+
run: docker-compose run --rm app npm run lint

.github/.workflows/test.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Use Docker Compose
16+
uses: docker/compose-action@v2
17+
with:
18+
compose-file: docker-compose.yml
19+
20+
- name: Run Jest tests
21+
run: docker-compose run --rm app npm run test

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ WORKDIR /usr/src/app
44

55
COPY package*.json .
66

7-
RUN npm ci
7+
RUN npm ci --only=production
88

99
COPY . .
1010

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
services:
2-
rate-limiter:
2+
app:
33
build: .
44
ports:
55
- 3000:3000

0 commit comments

Comments
 (0)