diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb50d9c..3b474a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,13 @@ name: CI -# based on: -# - https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/blob/master/.github/workflows/lint.yml -# - https://github.com/NullVoxPopuli/ember-autostash-modifier/blob/master/.github/workflows/ci.yml -# - https://github.com/emberjs/ember-test-helpers/blob/master/.github/workflows/ci-build.yml -# - https://github.com/NullVoxPopuli/ember-jsqr/blob/master/.github/workflows/tests.yml on: pull_request: push: - # filtering branches here prevents duplicate builds from pull_request and push branches: - main + - master schedule: - - cron: '0 3 * * 0' # every Sunday at 3am + - cron: "0 3 * * 0" # every Sunday at 3am env: CI: true @@ -26,18 +21,18 @@ jobs: strategy: matrix: node: - - "12" - - "14" + - "12" + - "14" steps: - - uses: actions/checkout@v2 - - uses: volta-cli/action@v1 - with: - node-version: ${{ matrix.node }} + - uses: actions/checkout@v2 + - uses: volta-cli/action@v1 + with: + node-version: ${{ matrix.node }} - - run: yarn install --frozen-lockfile + - run: yarn install --frozen-lockfile - - name: Test with ${{ matrix.node }} - run: yarn test + - name: Test with ${{ matrix.node }} + run: yarn ember test floating-dependencies: if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" @@ -47,8 +42,8 @@ jobs: strategy: matrix: node: - - "12" - - "14" + - "12" + - "14" steps: - uses: actions/checkout@v2 @@ -59,12 +54,12 @@ jobs: - run: yarn install --no-lockfile - name: Test with Node ${{ matrix.node }} - run: yarn test + run: yarn ember test try-scenarios: if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" name: "Compatibility" - timeout-minutes: 5 + timeout-minutes: 7 runs-on: ubuntu-latest needs: tests @@ -92,12 +87,27 @@ jobs: - name: test run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup + ember-cli-update: + if: github.event_name == 'pull_request' && github.event.pusher.name == 'renovate-bot' + runs-on: ubuntu-latest + needs: [tests, try-scenarios, floating-dependencies] + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.GitHubToken }} + - uses: actions/setup-node@v2 + - uses: kellyselden/ember-cli-update-action@v2 + with: + autofix_command: yarn lint:fix + ignore_to: true publish: name: Release runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - needs: [tests, floating-dependencies, try-scenarios] + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' + needs: [tests, try-scenarios, floating-dependencies] steps: - uses: actions/checkout@v2 @@ -107,7 +117,7 @@ jobs: - run: yarn install - name: Release + run: yarn semantic-release env: - GITHUB_TOKEN: ${{ secrets.GH_PAT }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: yarn semantic-release + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index ade141c..41ec069 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ }, "release": { "branches": [ - "main" + "main", + "master" ], "plugins": [ "@semantic-release/commit-analyzer", @@ -155,7 +156,7 @@ "configPath": "tests/dummy/config" }, "volta": { - "node": "14.15.4", + "node": "12.20.2", "yarn": "1.22.10" } } diff --git a/tests/dummy/config/ember-cli-update.json b/tests/dummy/config/ember-cli-update.json index 279e6da..9b4b0ab 100644 --- a/tests/dummy/config/ember-cli-update.json +++ b/tests/dummy/config/ember-cli-update.json @@ -15,6 +15,15 @@ ] } ] + }, + { + "name": "ember-addon-automated-ci", + "version": "1.0.2", + "blueprints": [ + { + "name": "ember-addon-automated-ci" + } + ] } ] }