-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration for github actions CI
- Modify tests to use Ember's VERSION as-is, as it can no longer be modified - Update implementation to also link to /current docs for any not-explicitly-stable VERSION value
- Loading branch information
1 parent
ed265d6
commit 6424beb
Showing
8 changed files
with
114 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
tags: | ||
- v* | ||
pull_request: { } | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
lint: | ||
timeout-minutes: 10 | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12.x | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile --non-interactive | ||
- name: Lint | ||
run: yarn lint | ||
|
||
floating-dependencies: | ||
timeout-minutes: 10 | ||
name: "Floating Dependencies" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12.x | ||
- name: Install Dependencies | ||
run: yarn install --no-lockfile | ||
- run: yarn test:ember | ||
|
||
try-scenarios: | ||
timeout-minutes: 10 | ||
name: "Try: ${{ matrix.ember-try-scenario }}" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: floating-dependencies | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ember-try-scenario: | ||
- ember-lts-3.12 | ||
- ember-lts-3.16 | ||
- ember-lts-3.20 | ||
- ember-lts-3.24 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12.x | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: test | ||
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,29 @@ | ||
/* eslint-disable ember/new-module-imports */ | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import { render } from '@ember/test-helpers'; | ||
import { VERSION } from '@ember/version'; | ||
import { hbs } from 'ember-cli-htmlbars'; | ||
import semver from 'semver'; | ||
|
||
module('Integration | Component | welcome page', function(hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
test('it links to version for release version', async function(assert) { | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
Ember.VERSION = '3.1.5'; | ||
test('it links to correct docs for the version of ember', async function(assert) { | ||
|
||
await render(hbs`<WelcomePage/>`); | ||
|
||
let [ emberMajor, emberMinor ] = Ember.VERSION.split('.'); | ||
let [ welcomeMajor, welcomeMinor, welcomePatch ] = this.element.querySelector('[data-ember-version]').dataset.emberVersion.split('.'); | ||
if (semver.valid(VERSION) && !semver.prerelease(VERSION)) { | ||
let [emberMajor, emberMinor] = VERSION.split('.'); | ||
let [welcomeMajor, welcomeMinor, welcomePatch] = this.element.querySelector( | ||
'[data-ember-version]').dataset.emberVersion.split('.'); | ||
|
||
assert.equal(emberMajor, welcomeMajor, "Major segment of version should match."); | ||
assert.equal(emberMinor, welcomeMinor, "Minor segment of version should match."); | ||
assert.equal("0", welcomePatch, "Patch segment of version should be 0."); | ||
}); | ||
|
||
test('it links to "/current" for alpha versions', async function(assert) { | ||
// Set the version property | ||
Ember.VERSION = '2.15.0-alpha.1'; | ||
|
||
await render(hbs`<WelcomePage/>`); | ||
|
||
let versionText = this.element.querySelector('[data-ember-version]').dataset.emberVersion; | ||
|
||
assert.equal(versionText, 'current', "Version text should be set to 'current' when an alpha version is used."); | ||
}); | ||
|
||
test('it links to "/current" for beta versions', async function(assert) { | ||
// Set the version property | ||
Ember.VERSION = '2.15.0-beta.1'; | ||
|
||
await render(hbs`<WelcomePage/>`); | ||
|
||
let versionText = this.element.querySelector('[data-ember-version]').dataset.emberVersion; | ||
|
||
assert.equal(versionText, 'current', "Version text should be set to 'current' when a beta version is used."); | ||
}); | ||
|
||
test('it links to "/current" for master', async function(assert) { | ||
// Set the version property | ||
Ember.VERSION = 'master'; | ||
|
||
await render(hbs`<WelcomePage/>`); | ||
|
||
let versionText = this.element.querySelector('[data-ember-version]').dataset.emberVersion; | ||
assert.equal(emberMajor, welcomeMajor, "Major segment of version should match."); | ||
assert.equal(emberMinor, welcomeMinor, "Minor segment of version should match."); | ||
assert.equal("0", welcomePatch, "Patch segment of version should be 0."); | ||
} else { | ||
let versionText = this.element.querySelector('[data-ember-version]').dataset.emberVersion; | ||
|
||
assert.equal(versionText, 'current', "Version text should be set to 'current' when master is used."); | ||
assert.equal(versionText, 'current', "Version text should be set to 'current' when a non-stable release is used."); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters