From fa840dcbc8d0f9b77b09d53e4e135907c65f06fc Mon Sep 17 00:00:00 2001 From: Alex DiLiberto Date: Thu, 12 Dec 2019 19:17:50 -0500 Subject: [PATCH 1/3] ci(actions): testing github actions --- .github/workflows/ci.yml | 111 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..ca2f0d87 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,111 @@ +name: CI + +on: + pull_request: + push: + # filtering branches here prevents duplicate builds from pull_request and push + branches: + - master + - 'v*' + # always run CI for tags + tags: + - '*' + # early issue detection: run CI weekly on Sundays + schedule: + - cron: '0 6 * * 0' + +env: + CI: true + +jobs: + test-locked-deps: + name: Locked Dependencies + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v1 + - name: Install Node + uses: actions/setup-node@v1 + with: + node-version: 8 + - name: Install Dependencies + run: yarn install --non-interactive + - name: Lint HBS + run: yarn lint:hbs + - name: Lint JS + run: yarn lint:js + - name: Browser Tests + run: yarn test + + test-floating-deps: + name: Floating Dependencies + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v1 + - name: Install Node + uses: actions/setup-node@v1 + with: + node-version: 8 + - name: Install Dependencies + run: yarn install --no-lockfile --non-interactive + - name: Browser Tests + run: yarn test + + test-ember-try: + name: Ember Try + runs-on: ubuntu-latest + needs: [test-locked-deps, test-floating-deps] + strategy: + matrix: + scenario: + - ember-3.13 + - ember-release + - ember-beta + - ember-canary + - ember-default-with-jquery + steps: + - name: Checkout Code + uses: actions/checkout@v1 + - name: Install Node + uses: actions/setup-node@v1 + with: + node-version: 8 + - name: Install Dependencies + run: yarn install --no-lockfile --non-interactive + - name: Scenario + run: yarn ember try:one ${{ matrix.scenario }} + + # deploy-prod: + # name: Production Deploy + # runs-on: ubuntu-latest + # needs: [test-ember-try] + # if: (branch = master OR tag IS present) AND type = push + # steps: + # - name: Checkout Code + # uses: actions/checkout@v1 + # - name: Install Node + # uses: actions/setup-node@v1 + # with: + # node-version: 8 + # - name: Install Dependencies + # run: yarn install --no-lockfile --non-interactive + # - name: Deploy + # run: yarn ember deploy production + + # publish-npm: + # name: NPM Publish + # runs-on: ubuntu-latest + # needs: [deploy-prod] + # steps: + # - name: Checkout Code + # uses: actions/checkout@v1 + # - name: Install Node + # uses: actions/setup-node@v1 + # with: + # node-version: 8 + # registry-url: https://registry.npmjs.org/ + # - name: Publish + # run: npm publish --dry-run + # env: + # NODE_AUTH_TOKEN: ${{secrets.npm_token}} \ No newline at end of file From 230a1f518b63b9cbf6dde81994a90eef25a834c1 Mon Sep 17 00:00:00 2001 From: Alex DiLiberto Date: Sat, 14 Dec 2019 00:09:13 -0500 Subject: [PATCH 2/3] ci(actions): break apart test-locked-deps and lint --- .github/workflows/ci.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca2f0d87..ba6c62dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,8 @@ env: CI: true jobs: - test-locked-deps: - name: Locked Dependencies + lint: + name: Lint runs-on: ubuntu-latest steps: - name: Checkout Code @@ -34,12 +34,26 @@ jobs: run: yarn lint:hbs - name: Lint JS run: yarn lint:js + + test-locked-deps: + name: Locked Dependencies + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v1 + - name: Install Node + uses: actions/setup-node@v1 + with: + node-version: 8 + - name: Install Dependencies + run: yarn install --non-interactive - name: Browser Tests run: yarn test test-floating-deps: name: Floating Dependencies runs-on: ubuntu-latest + needs: [lint, test-locked-deps] steps: - name: Checkout Code uses: actions/checkout@v1 @@ -47,7 +61,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: 8 - - name: Install Dependencies + - name: Install Dependencies without Lockfile run: yarn install --no-lockfile --non-interactive - name: Browser Tests run: yarn test @@ -55,7 +69,7 @@ jobs: test-ember-try: name: Ember Try runs-on: ubuntu-latest - needs: [test-locked-deps, test-floating-deps] + needs: [lint, test-locked-deps] strategy: matrix: scenario: @@ -73,7 +87,7 @@ jobs: node-version: 8 - name: Install Dependencies run: yarn install --no-lockfile --non-interactive - - name: Scenario + - name: "Scenario: ${{ matrix.scenario }}" run: yarn ember try:one ${{ matrix.scenario }} # deploy-prod: @@ -108,4 +122,4 @@ jobs: # - name: Publish # run: npm publish --dry-run # env: - # NODE_AUTH_TOKEN: ${{secrets.npm_token}} \ No newline at end of file + # NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} \ No newline at end of file From 9b1ebbd1264119b0978808607c595f63bec70985 Mon Sep 17 00:00:00 2001 From: Alex DiLiberto Date: Sat, 14 Dec 2019 18:36:27 -0500 Subject: [PATCH 3/3] ci(actions): enable deploy-prod --- .github/workflows/ci.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba6c62dc..ee461a07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,22 +90,23 @@ jobs: - name: "Scenario: ${{ matrix.scenario }}" run: yarn ember try:one ${{ matrix.scenario }} - # deploy-prod: - # name: Production Deploy - # runs-on: ubuntu-latest - # needs: [test-ember-try] - # if: (branch = master OR tag IS present) AND type = push - # steps: - # - name: Checkout Code - # uses: actions/checkout@v1 - # - name: Install Node - # uses: actions/setup-node@v1 - # with: - # node-version: 8 - # - name: Install Dependencies - # run: yarn install --no-lockfile --non-interactive - # - name: Deploy - # run: yarn ember deploy production + deploy-prod: + name: Production Deploy + runs-on: ubuntu-latest + needs: [test-floating-deps, test-ember-try] + # if: (branch = master OR tag IS present) AND type = push + if: github.ref == 'master' && github.event_name == 'push' + steps: + - name: Checkout Code + uses: actions/checkout@v1 + - name: Install Node + uses: actions/setup-node@v1 + with: + node-version: 8 + - name: Install Dependencies + run: yarn install --no-lockfile --non-interactive + - name: Deploy + run: yarn ember deploy production # publish-npm: # name: NPM Publish