From 6dd5973e32faaf14e653c46035a69f6c67fdf8aa Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 28 Oct 2020 16:16:14 -0400 Subject: [PATCH] Load ember-try as an in-repo addon from smoke-test-app. This allows us to remove hte custom `npm pack` work that was being done in `run-smoke-test.sh` and simplify the testing of the smoke-test-app. --- .github/workflows/ci.yml | 12 ++++++++++-- package.json | 4 ++-- run-smoke-test.sh | 16 ---------------- smoke-test-app/package.json | 7 ++++++- 4 files changed, 18 insertions(+), 21 deletions(-) delete mode 100755 run-smoke-test.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e00aeec5..a3994478 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,11 @@ jobs: with: node-version: ${{ matrix.node }} - - run: yarn install + - name: install deps + run: yarn install + - name: install smoke-test-app deps + run: npm install + working-directory: smoke-test-app - run: npm run smoke-test yarn-smoke-tests: @@ -168,5 +172,9 @@ jobs: with: node-version: ${{ matrix.node }} - - run: yarn install + - name: install deps + run: yarn install + - name: install smoke-test-app deps + run: yarn install + working-directory: smoke-test-app - run: yarn smoke-test-yarn diff --git a/package.json b/package.json index 95107597..1b226c7f 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,8 @@ "lint:js": "eslint .", "node-test": "mocha test/**/*.js", "node-test-with-coverage": "nyc --reporter lcov npm run-script node-test && node_modules/.bin/codecov", - "smoke-test": "./run-smoke-test.sh smoke-test.sh", - "smoke-test-yarn": "./run-smoke-test.sh smoke-test-yarn.sh", + "smoke-test": "cd smoke-test-app && ./smoke-test.sh", + "smoke-test-yarn": "cd smoke-test-app && ./smoke-test-yarn.sh", "start": "ember serve", "test": "npm run-script lint && npm run-script node-test" }, diff --git a/run-smoke-test.sh b/run-smoke-test.sh deleted file mode 100755 index 99c0e515..00000000 --- a/run-smoke-test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -set -ex -rm ember-try*.tgz || true -npm pack -now=$(date +%s) -mv ember-try*.tgz "ember-try-${now}.tgz" -if [[ $npm_execpath =~ ^.*yarn.*$ ]]; then - cd smoke-test-app && yarn upgrade "ember-try@file:../ember-try-${now}.tgz" && yarn install && "./${1}" -else - if [[ $(npm -v | cut -d '.' -f 1) -lt 5 ]]; then - cd smoke-test-app && json -I -f package.json -e "this.devDependencies['ember-try']='../ember-try-${now}.tgz'" && npm install && "./${1}" - else - cd smoke-test-app && npm install --save-dev "../ember-try-${now}.tgz" && npm install && "./${1}" - fi -fi diff --git a/smoke-test-app/package.json b/smoke-test-app/package.json index 75ca6141..f6a01d3c 100644 --- a/smoke-test-app/package.json +++ b/smoke-test-app/package.json @@ -40,7 +40,6 @@ "ember-qunit": "^4.6.0", "ember-resolver": "^8.0.2", "ember-source": "~3.22.0", - "ember-try": "file:../", "eslint-plugin-ember": "^8.14.0", "loader.js": "^4.7.0", "qunit-dom": "^1.5.0" @@ -50,5 +49,11 @@ }, "engines": { "node": "6.* || 8.* || >= 10.*" + }, + "ember-addon": { + "#": "use ember-try as an 'in-repo' addon", + "paths": [ + "../" + ] } }