Skip to content

Commit 2603dc1

Browse files
authored
Merge pull request #274 from ComputerScienceHouse/github-ci
GitHub CI instead of Travis
2 parents 942db25 + 43d835d commit 2603dc1

File tree

5 files changed

+110
-25
lines changed

5 files changed

+110
-25
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: conditional
17+
18+
jobs:
19+
build:
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: [8.x, 10.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: npm install
27+
- run: npm run production

.github/workflows/python-app.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python application
5+
6+
on:
7+
push:
8+
branches: [master, develop]
9+
pull_request:
10+
branches: [master, develop]
11+
12+
jobs:
13+
lint:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
python-version: [3.8, 3.9]
19+
20+
steps:
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 conditional

.travis.yml

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

gulpfile.js/tasks/production.js

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
var config = require('../config');
2-
var gulp = require('gulp');
3-
var gulpSequence = require('gulp-sequence');
4-
var getEnabledTasks = require('../lib/getEnabledTasks');
1+
var config = require("../config");
2+
var gulp = require("gulp");
3+
var gulpSequence = require("gulp-sequence");
4+
var getEnabledTasks = require("../lib/getEnabledTasks");
55

66
var productionTask = function (cb) {
7-
global.production = true;
8-
var tasks = getEnabledTasks('production');
9-
gulpSequence(tasks.initTasks, tasks.linterTasks, tasks.assetTasks, tasks.codeTasks, config.tasks.production.rev ? 'rev' : false, 'size-report', 'static', cb);
10-
}
7+
global.production = true;
8+
var tasks = getEnabledTasks("production");
9+
gulpSequence(
10+
tasks.initTasks,
11+
tasks.assetTasks,
12+
tasks.codeTasks,
13+
config.tasks.production.rev ? "rev" : false,
14+
"size-report",
15+
"static",
16+
cb
17+
);
18+
};
1119

12-
gulp.task('production', productionTask);
20+
gulp.task("production", productionTask);
1321
module.exports = productionTask;

0 commit comments

Comments
 (0)