Skip to content

Commit

Permalink
Improve CI a bit (#1055)
Browse files Browse the repository at this point in the history
Don't re-install deps fresh from the cache, don't pollute the main cache
with try attempts.
  • Loading branch information
mixonic authored Dec 15, 2023
1 parent ed2dea6 commit 6efb39c
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node 14
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Use Volta
uses: volta-cli/action@v4

- name: Node Modules Cache
uses: actions/cache@v2
id: cache-npm
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ci-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install Dependencies
if: steps.cache-npm.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Lint
Expand Down Expand Up @@ -57,21 +57,29 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node 14
uses: actions/setup-node@v3
with:
node-version: 14.x
- name: Use Volta
uses: volta-cli/action@v4
- name: Stash yarn.lock for cache key
run: cp yarn.lock __cache-key

- name: Node Modules Cache
uses: actions/cache@v2
id: cache-npm
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ci-yarn-${{ matrix.ember-version }}-${{ hashFiles('**/yarn.lock') }}
path: |
node_modules
package.json
yarn.lock
__env
key: ci-yarn-v3-${{ matrix.ember-version }}-${{ hashFiles('config/ember-try.js', '__cache-key') }}
restore-keys: |
ci-yarn-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn install --frozen-lockfile --ignore-engines
- name: Install Dependencies
if: steps.cache-npm.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

- name: Run Tests
run: node_modules/.bin/ember try:one ${{ matrix.ember-version }} --skip-cleanup

0 comments on commit 6efb39c

Please sign in to comment.