Skip to content

Commit d0a3d6d

Browse files
committed
Get some more output when things are failing.
1 parent efa0439 commit d0a3d6d

File tree

5 files changed

+148
-75
lines changed

5 files changed

+148
-75
lines changed

.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
env: {
3+
commonjs: true,
4+
es6: true,
5+
node: true
6+
},
7+
extends: 'eslint:recommended',
8+
globals: {
9+
Atomics: 'readonly',
10+
SharedArrayBuffer: 'readonly'
11+
},
12+
parserOptions: {
13+
ecmaVersion: 2018
14+
},
15+
rules: {
16+
'no-console': 0
17+
}
18+
};

.github/workflows/test.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Test
22

3-
on:
4-
pull_request:
5-
branches:
6-
- master
7-
push:
8-
branches:
9-
- master
3+
on: [push]
4+
# pull_request:
5+
# branches:
6+
# - master
7+
# push:
8+
# branches:
9+
# - master
1010

1111
jobs:
1212
build:
@@ -15,8 +15,8 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest, windows-latest, macOS-latest]
18-
python-version: [3.6, 3.7, 2.7]
19-
node-version: [8, 10, 12]
18+
python-version: [3.6, 2.7] # 3.7
19+
node-version: [12] # 8, 10
2020
steps:
2121
- uses: actions/checkout@v2
2222

@@ -35,7 +35,7 @@ jobs:
3535
python --version
3636
3737
- name: Install setuptools
38-
run: python -m pip install setuptools wheel
38+
run: python -m pip install --force setuptools wheel
3939

4040
- name: Install pipenv / poetry
4141
run: python -m pip install pipenv poetry
@@ -49,11 +49,20 @@ jobs:
4949
- name: Lint
5050
run: npm run ci:lint
5151
# Don't run lint a hundred times, also it breaks on windows.
52-
if: matrix.python-version == 3.7 && matrix.node-version == 12 && matrix.os == 'ubuntu-latest'
52+
if: matrix.python-version == 3.6 && matrix.node-version == 12 && matrix.os == 'ubuntu-latest'
5353

5454
- name: Test
5555
run: npm run test
5656
env:
5757
USE_PYTHON: python
5858
LC_ALL: C.UTF-8
5959
LANG: C.UTF-8
60+
if: matrix.os != 'macOS-latest'
61+
62+
- name: Test (Mac)
63+
run: npm run test
64+
env:
65+
USE_PYTHON: python
66+
LC_ALL: en_US.UTF-8
67+
LANG: en_US.UTF-8
68+
if: matrix.os == 'macOS-latest'

lib/docker.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ function findTestFile(servicePath) {
7373
* @return {boolean}
7474
*/
7575
function tryBindPath(serverless, bindPath, testFile) {
76+
const debug = process.env.SLS_DEBUG;
7677
const options = [
7778
'run',
7879
'--rm',
@@ -83,13 +84,12 @@ function tryBindPath(serverless, bindPath, testFile) {
8384
`/test/${testFile}`
8485
];
8586
try {
87+
if (debug) serverless.cli.log(`Trying bindPath ${bindPath} (${options})`);
8688
const ps = dockerCommand(options);
87-
if (process.env.SLS_DEBUG) {
88-
serverless.cli.log(`Trying bindPath ${bindPath} (${options})`);
89-
serverless.cli.log(ps.stdout.trim());
90-
}
89+
if (debug) serverless.cli.log(ps.stdout.trim());
9190
return ps.stdout.trim() === `/test/${testFile}`;
9291
} catch (err) {
92+
if (debug) serverless.cli.log(`Finding bindPath failed with ${err}`);
9393
return false;
9494
}
9595
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
"devDependencies": {
4747
"eslint": "^5.16.0",
48-
"prettier": "*",
48+
"prettier": "^1",
4949
"cross-spawn": "*",
5050
"tape": "*",
5151
"tape-promise": "*",

0 commit comments

Comments
 (0)