Compare commits

..
3 changed files with 18 additions and 11 deletions
+4 -3
View File
@@ -5,6 +5,7 @@ on:
branches: branches:
- master - master
- renovate/** - renovate/**
- 1692/setup-renovate-debug
pull_request: pull_request:
types: types:
@@ -16,9 +17,9 @@ jobs:
strategy: strategy:
matrix: matrix:
node-version: node-version:
- 10 # - 10
- 12 - 12
- 14 # - 14
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -31,7 +32,7 @@ jobs:
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- uses: bahmutov/npm-install@v1 - uses: bahmutov/npm-install@v1
- run: npm run test:ci - run: npx ava test/integration.test.js
# separate job to set as required in branch protection, # separate job to set as required in branch protection,
# as the build names above change each time Node versions change # as the build names above change each time Node versions change
+7
View File
@@ -21,6 +21,13 @@ See https://github.com/semantic-release/semantic-release/blob/master/docs/suppor
process.exit(1); process.exit(1);
} }
console.log("DEBUG START ==========")
console.log('process.env')
console.log(process.env)
console.log('envCi({ env: process.env })')
console.log(require('env-ci')({ env: process.env }))
console.log("DEBUG END ==========")
execa('git', ['--version']) execa('git', ['--version'])
.then(({stdout}) => { .then(({stdout}) => {
var gitVersion = findVersions(stdout)[0]; var gitVersion = findVersions(stdout)[0];
+7 -8
View File
@@ -1,5 +1,5 @@
const path = require('path'); const path = require('path');
const test = require('ava'); const { serial: test } = require('ava');
const proxyquire = require('proxyquire'); const proxyquire = require('proxyquire');
const {escapeRegExp} = require('lodash'); const {escapeRegExp} = require('lodash');
const {writeJson, readJson} = require('fs-extra'); const {writeJson, readJson} = require('fs-extra');
@@ -29,7 +29,11 @@ const npmRegistry = require('./helpers/npm-registry');
const requireNoCache = proxyquire.noPreserveCache(); const requireNoCache = proxyquire.noPreserveCache();
// Environment variables used with semantic-release cli (similar to what a user would setup) // Environment variables used with semantic-release cli (similar to what a user would setup)
const {GITHUB_ACTION, GITHUB_TOKEN, ...processEnvWithoutGitHubActionsVariables} = process.env; const {
GITHUB_ACTION,
GITHUB_TOKEN,
...processEnvWithoutGitHubActionsVariables
} = process.env
const env = { const env = {
...processEnvWithoutGitHubActionsVariables, ...processEnvWithoutGitHubActionsVariables,
...npmRegistry.authEnv, ...npmRegistry.authEnv,
@@ -652,12 +656,7 @@ test('Hide sensitive environment variable values from the logs', async (t) => {
}); });
t.log('$ semantic-release'); t.log('$ semantic-release');
const {stdout, stderr} = await execa(cli, [], { const {stdout, stderr} = await execa(cli, [], {env: {...env, MY_TOKEN: 'secret token'}, cwd, reject: false, extendEnv: false});
env: {...env, MY_TOKEN: 'secret token'},
cwd,
reject: false,
extendEnv: false,
});
t.regex(stdout, new RegExp(`Console: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`)); t.regex(stdout, new RegExp(`Console: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`));
t.regex(stdout, new RegExp(`Log: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`)); t.regex(stdout, new RegExp(`Log: Exposing token ${escapeRegExp(SECRET_REPLACEMENT)}`));