From 00a537a1779d82170c5ef4908e4652ac032ca7f9 Mon Sep 17 00:00:00 2001 From: Thomas Wang Date: Sun, 2 Feb 2020 18:23:24 -0800 Subject: [PATCH 1/3] Add github workflow ci --- .github/workflows/ci.yml | 114 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 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..a31929cc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,114 @@ +name: CI + +on: + push: + branches: + - master + pull_request: {} + schedule: + - cron: '0 3 * * *' # daily, at 3am + +jobs: + test: + name: Tests + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - if: matrix.os == 'macos-latest' + run: | + brew update + brew cask install google-chrome + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 8.x + - name: get yarn cache dir + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: install dependencies + run: yarn install --frozen-lockfile --ignore-engines + - name: lint + if: matrix.os != 'windows-latest' + run: yarn lint:js + - name: test + run: yarn test + - name: node-test + run: yarn test:node + + floating-dependencies: + name: Floating Dependencies + + runs-on: ubuntu-latest + + needs: test + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 8.x + - name: get yarn cache dir + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-floating-dependencies-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: install dependencies + run: yarn install --no-lockfile + - run: yarn test + + ember-try-scenarios: + name: ${{ matrix.ember-try-scenario }} + + runs-on: ubuntu-latest + + needs: [test, floating-dependencies] + + strategy: + fail-fast: true + matrix: + ember-try-scenario: + - ember-lts-3.4 + - ember-lts-3.8 + - ember-lts-3.12 + - ember-release + - ember-beta + - ember-canary + - ember-default + - ember-default-with-jquery + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 8.x + - name: get yarn cache dir + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-try-scenarios-${{ matrix.ember-try-scenario }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: install dependencies + run: yarn install + - name: test + env: + EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }} + run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO + From 3688ed0b0040a076f1a7a3fee42c4a5059b21e8f Mon Sep 17 00:00:00 2001 From: Thomas Wang Date: Sun, 2 Feb 2020 22:26:30 -0800 Subject: [PATCH 2/3] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a31929cc..c35a2c63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 8.x + - run: npm i -g npm - name: get yarn cache dir id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" From f04adee96e033bb9564a93dba6ef778d2598b75c Mon Sep 17 00:00:00 2001 From: Thomas Wang Date: Sun, 2 Feb 2020 23:22:50 -0800 Subject: [PATCH 3/3] Update ci.yml --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c35a2c63..26f79b44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,8 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 8.x - - run: npm i -g npm + - run: npm update -g npm + if: matrix.os == 'windows-latest' - name: get yarn cache dir id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)"