From 5953a97752c90fdc5b82bd6636f1812545858b1a Mon Sep 17 00:00:00 2001 From: Alex LaFroscia Date: Thu, 9 Apr 2020 11:46:59 -0400 Subject: [PATCH] chore: add GitHub Workflow for CI --- .github/workflows/ci.yml | 67 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 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..46465736 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,67 @@ +name: CI + +on: [push, pull_request] + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: volta-cli/action@v1 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - run: yarn lint:ts + - run: yarn lint:hbs + - run: yarn ember test + + floating-deps: + name: Floating Dependencies + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: volta-cli/action@v1 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --no-lockfile + - run: yarn ember test + + ember-try: + name: Ember Try + needs: [test, floating-deps] + runs-on: ubuntu-latest + strategy: + matrix: + ember-try-scenario: [ember-lts-2.16, ember-lts-2.18, ember-release, ember-beta, ember-canary, ember-default-with-jquery] + steps: + - uses: actions/checkout@v1 + - uses: volta-cli/action@v1 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - run: yarn ember try:one ${{ matrix.ember-try-scenario }}