Skip to content

Commit

Permalink
run CI using GitHub Actions (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
jelhan committed Feb 25, 2022
1 parent 777d510 commit 287fbf0
Show file tree
Hide file tree
Showing 4 changed files with 436 additions and 25 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
test:
name: "Tests"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: Run Tests
run: yarn test:ember

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
- name: Install Dependencies
run: yarn install --no-lockfile
- name: Run Tests
run: yarn test:ember

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: 'test'

strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.4
- ember-lts-3.8
- ember-lts-3.16
- ember-lts-3.24

steps:
- uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: 12.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
70 changes: 51 additions & 19 deletions config/ember-try.js
Expand Up @@ -23,52 +23,84 @@ module.exports = async function() {
}
},
{
name: 'ember-release',
name: 'ember-lts-3.16',
npm: {
devDependencies: {
'ember-source': await getChannelURL('release')
'ember-source': '~3.16.0'
}
}
},
{
name: 'ember-beta',
name: 'ember-lts-3.24',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta')
'ember-source': '~3.24.0'
}
}
},
{
name: 'ember-canary',
name: 'ember-lts-3.28',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary')
'ember-source': '~3.28.0'
}
}
},
// The default `.travis.yml` runs this scenario via `npm test`,
// not via `ember try`. It's still included here so that running
// `ember try:each` manually or from a customized CI config will run it
// along with all the other scenarios.
{
name: 'ember-default',
name: 'ember-release',
npm: {
devDependencies: {}
}
devDependencies: {
'ember-source': await getChannelURL('release'),
},
},
},
{
name: 'ember-beta',
npm: {
devDependencies: {
'ember-source': await getChannelURL('beta'),
},
},
},
{
name: 'ember-canary',
npm: {
devDependencies: {
'ember-source': await getChannelURL('canary'),
},
},
},
{
name: 'ember-default-with-jquery',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'jquery-integration': true
})
'jquery-integration': true,
}),
},
npm: {
devDependencies: {
'@ember/jquery': '^0.5.1'
}
}
}
'@ember/jquery': '^1.1.0',
},
},
},
{
name: 'ember-classic',
env: {
EMBER_OPTIONAL_FEATURES: JSON.stringify({
'application-template-wrapper': true,
'default-async-observers': false,
'template-only-glimmer-components': false,
}),
},
npm: {
devDependencies: {
'ember-source': '~3.28.0',
},
ember: {
edition: 'classic',
},
},
},
]
};
};
14 changes: 10 additions & 4 deletions package.json
Expand Up @@ -13,12 +13,17 @@
"test": "tests"
},
"scripts": {
"build": "ember build",
"build": "ember build --environment=production",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "ember serve",
"test": "ember test",
"test:all": "ember try:each"
"test": "npm-run-all lint test:*",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"ember-cli-babel": "^7.7.3",
Expand Down Expand Up @@ -49,6 +54,7 @@
"eslint-plugin-ember": "^6.2.0",
"eslint-plugin-node": "^9.0.1",
"loader.js": "^4.7.0",
"npm-run-all": "^4.1.5",
"qunit-dom": "^0.8.4"
},
"engines": {
Expand Down

0 comments on commit 287fbf0

Please sign in to comment.