Skip to content

Commit

Permalink
Use matrix builds to speed up all commands smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Oct 28, 2020
1 parent f1874e5 commit 250ae78
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 62 deletions.
72 changes: 70 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,80 @@ jobs:
- tests
- floating-deps

strategy:
matrix:
command:
# try:each
- ./node_modules/.bin/ember try:each

# skip-cleanup option
- ./node_modules/.bin/ember try:each --skip-cleanup

# config-path option
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js'

# both ember-try options
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true

# try:ember
- ./node_modules/.bin/ember try:ember '> 2.10.0 < 3.0.0'
- ./node_modules/.bin/ember try:ember '2.10.0' --config-path='../test/fixtures/dummy-ember-try-config.js'
- ./node_modules/.bin/ember try:ember '3.2.0' --skip-cleanup=true

# try:config
- ./node_modules/.bin/ember try:config
- ./node_modules/.bin/ember try:config --config-path='../test/fixtures/dummy-ember-try-config.js'

# try:one <scenario>
- ./node_modules/.bin/ember try:one default

# custom command
- ./node_modules/.bin/ember try:one default --- ember help

# skip-cleanup option
- ./node_modules/.bin/ember try:one default --skip-cleanup

# config-path option
- ./node_modules/.bin/ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js'

# both ember-try options
- ./node_modules/.bin/ember try:one test1 --config-path='../test/fixtures/dummy-ember-try-config.js' --skip-cleanup true

# custom command with options to command
- ./node_modules/.bin/ember try:one default --- ember help --silent

# custom command mixed with ember try's own option
- ./node_modules/.bin/ember try:one default --skip-cleanup --- ember help --silent

# try:reset
- ./node_modules/.bin/ember try:reset

# Environment variables availability
- FOO="5" ./node_modules/.bin/ember try:one default --- ./fail-if-no-foo.sh

- ./node_modules/.bin/ember try:one default --- FOO=5 ./fail-if-no-foo.sh

# Custom, compound commands
- ./node_modules/.bin/ember try:one default --- 'echo 1 && echo 2'

# Environment variables from config
- ./node_modules/.bin/ember try:each --config-path='../test/fixtures/dummy-ember-try-config-different-env-vars.js'


steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1

- run: yarn install
- run: npm run client-test
- name: install deps
run: yarn install
- name: install smoke-test-app deps
# using `npm` to install in the smoke-test-app so that `file:` will be treated
# as a symlink (npm handles `file:../` as symlink, and `yarn` treats it
# as "copy into this directory")
run: npm install
working-directory: smoke-test-app
- run: ${{ matrix.command }}
working-directory: smoke-test-app

npm-smoke-tests:
strategy:
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"scripts": {
"all-test": "npm run-script node-test && npm run-script smoke-test",
"build": "ember build",
"client-test": "./run-smoke-test.sh all-commands.sh",
"lint": "eslint lib test",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
Expand All @@ -33,7 +32,7 @@
"smoke-test": "./run-smoke-test.sh smoke-test.sh",
"smoke-test-yarn": "./run-smoke-test.sh smoke-test-yarn.sh",
"start": "ember serve",
"test": "npm run-script lint && npm run-script node-test && npm run-script client-test"
"test": "npm run-script lint && npm run-script node-test"
},
"dependencies": {
"chalk": "^4.1.0",
Expand Down
58 changes: 0 additions & 58 deletions smoke-test-app/all-commands.sh

This file was deleted.

1 change: 1 addition & 0 deletions smoke-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"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"
Expand Down

0 comments on commit 250ae78

Please sign in to comment.