diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ae687df --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,74 @@ +name: CI + +on: + push: + branches: + - master + - main + - "v*" + pull_request: + +env: + NODE_VERSION: 6 + FORCE_COLOR: 1 + +jobs: + lint: + name: Linting + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ env.NODE_VERSION }} + - run: yarn + - run: yarn lint:js + + test: + name: Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ env.NODE_VERSION }} + - run: yarn --ignore-engines + - run: yarn test:ember + + floating-dependencies: + name: Floating Dependencies + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ env.NODE_VERSION }} + - run: yarn --no-lockfile --ignore-engines + - run: yarn test:ember + + try-scenarios: + name: "ember-try: ${{ matrix.ember-try-scenario }}" + runs-on: ubuntu-latest + timeout-minutes: 7 + needs: test + + strategy: + fail-fast: false + matrix: + ember-try-scenario: + - ember-lts-2.4 + - ember-lts-2.8 + - ember-release + - ember-canary + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ env.NODE_VERSION }} + - run: yarn --ignore-engines + - name: test + run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 378c23f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -language: node_js -node_js: - - "6" - -sudo: false - -cache: - yarn: true - -env: - # we recommend testing LTS's and latest stable release (bonus points to beta/canary) - - EMBER_TRY_SCENARIO=ember-lts-2.4 - - EMBER_TRY_SCENARIO=ember-lts-2.8 - - EMBER_TRY_SCENARIO=ember-release - - EMBER_TRY_SCENARIO=ember-canary - - EMBER_TRY_SCENARIO=ember-default - -matrix: - fast_finish: true - allow_failures: - - env: EMBER_TRY_SCENARIO=ember-canary - - env: EMBER_TRY_SCENARIO=ember-beta - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - - yarn global add phantomjs-prebuilt - - phantomjs --version - -install: - - yarn install --no-lockfile - -script: - # Usually, it's ok to finish the test scenario without reverting - # to the addon's original dependency state, skipping "cleanup". - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup diff --git a/package.json b/package.json index d3ee47a..ea0c094 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,9 @@ "scripts": { "build": "ember build", "start": "ember server", - "test": "ember try:each" + "test": "ember try:each", + "test:ember": "ember test", + "lint:js": "eslint . --cache" }, "dependencies": { "broccoli-funnel": "^2.0.0", @@ -58,6 +60,6 @@ }, "ember-addon": { "configPath": "tests/dummy/config", - "demoURL": "https://gcollazo.github.io/ember-cli-showdown/" + "demoURL": "https://mansona.github.io/ember-cli-showdown/" } }