Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve env initialisation and test setup #502

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test": "mocha ./tests/**/*.js --timeout 0 --exit",
"prepublishOnly": "npm run build",
"copy-files": "cp -r ./src/init/artifacts ./.build/cjs/src/init/ && cp -r ./src/init/artifacts ./.build/esm/src/init/ && cp -r ./src/init/update-artifacts ./.build/cjs/src/init/ && cp -r ./src/init/update-artifacts ./.build/esm/src/init/",
"link:local": "npm run build && npm link"
"link:local": "npm run build:clean && npm run build && npm link"
},
"license": "ISC",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion src/env/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function startEnv(option) {

await getDockerCompose();
await exec(`${versionTags} ${dockerComposeCmd} pull`);
await exec(`${versionTags} ${dockerComposeCmd} up -d --wait`);
await exec(`${versionTags} ${dockerComposeCmd} up -d`);

await ensureNodeAndCompilerAvailable();

Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const config = require('../config/config.json');
// eslint-disable-next-line no-promise-executor-return
const pause = async (duration) => new Promise((resolve) => setTimeout(resolve, duration));

const ensureNodeAndCompilerAvailable = async (interval = 200, attempts = 1000) => {
const ensureNodeAndCompilerAvailable = async (interval = 100, attempts = 1200) => {
// eslint-disable-next-line no-plusplus
for (let i = 0; i < attempts; i++) {
// eslint-disable-next-line no-await-in-loop
Expand Down
2 changes: 1 addition & 1 deletion tests/happy-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const exec = (cmd, options) => execP(`${fs.existsSync('~/.profile') ? '. ~/.prof

describe('Happy Path', () => {
before(async () => {
await exec('npm link');
await exec('npm run link:local');
if (!fs.existsSync(cwd)) fs.mkdirSync(cwd);
});

Expand Down
Loading