Skip to content

Commit e4cba1c

Browse files
committed
Creating node and docker ci
1 parent 881dbc8 commit e4cba1c

File tree

6 files changed

+84
-34
lines changed

6 files changed

+84
-34
lines changed

.github/workflows/docker-build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Docker
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
9+
# Run tests for any PRs.
10+
pull_request:
11+
branches:
12+
- develop
13+
- master
14+
15+
env:
16+
IMAGE_NAME: packet
17+
18+
jobs:
19+
test:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Run tests
26+
run: |
27+
if [ -f docker-compose.test.yml ]; then
28+
docker-compose --file docker-compose.test.yml build
29+
docker-compose --file docker-compose.test.yml run sut
30+
else
31+
docker build . --file Dockerfile
32+
fi

.github/workflows/node-js.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [develop, master]
9+
pull_request:
10+
branches: [develop, master]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [10.x, 12.x, 14.x]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- run: yarn install
27+
- run: yarn prod

.github/workflows/python-app.yml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,30 @@ name: Python application
55

66
on:
77
push:
8-
branches: [ master, develop ]
8+
branches: [master, develop]
99
pull_request:
10-
branches: [ master, develop ]
10+
branches: [master, develop]
1111

1212
jobs:
1313
lint:
14-
1514
runs-on: ubuntu-latest
1615

16+
strategy:
17+
matrix:
18+
python-version: [3.7, 3.8]
19+
1720
steps:
18-
- name: Install ldap dependencies
19-
run: sudo apt-get install libldap2-dev libsasl2-dev
20-
- uses: actions/checkout@v2
21-
- name: Set up Python 3.7
22-
uses: actions/setup-python@v2
23-
with:
24-
python-version: 3.7
25-
- name: Install dependencies
26-
run: |
27-
python -m pip install --upgrade pip
28-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29-
- name: Lint with pylint
30-
run: |
31-
pylint packet
21+
- name: Install ldap dependencies
22+
run: sudo apt-get install libldap2-dev libsasl2-dev
23+
- uses: actions/checkout@v2
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32+
- name: Lint with pylint
33+
run: |
34+
pylint packet

.travis.yml

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

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM python:3.7-slim-buster
22
MAINTAINER Devin Matte <[email protected]>
33

44
RUN apt-get -yq update && \
5-
apt-get -yq --no-install-recommends install gcc curl libsasl2-dev libldap2-dev libssl-dev && \
5+
apt-get -yq --no-install-recommends install gcc curl libsasl2-dev libldap2-dev libssl-dev gnupg2 && \
66
apt-get -yq clean all
77

88
RUN mkdir /opt/packet

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
"Joel Eager (https://github.com/JoelEager)",
1414
"Max Meinhold (https://github.com/mxmeinhold)"
1515
],
16+
"scripts": {
17+
"prod": "gulp production",
18+
"lint": "gulp lint"
19+
},
1620
"repository": {
1721
"type": "git",
1822
"url": "https://github.com/ComputerScienceHouse/packet.git"

0 commit comments

Comments
 (0)