Skip to content

Commit

Permalink
ci: using built-in caching from setup-node (#1501)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart committed Jul 20, 2021
1 parent 2a05e29 commit 8e76d8f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 60 deletions.
44 changes: 12 additions & 32 deletions .github/workflows/ci.yml
Expand Up @@ -10,13 +10,8 @@ jobs:
- uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version: '14'
- uses: Brightspace/third-party-actions@actions/cache
id: cache
with:
path: '**/node_modules'
key: npm-${{ hashFiles('**/package-lock.json') }}
cache: 'npm'
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build
run: npm run build
Expand All @@ -35,13 +30,8 @@ jobs:
- uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version: '14'
- uses: Brightspace/third-party-actions@actions/cache
id: cache
with:
path: '**/node_modules'
key: npm-${{ hashFiles('**/package-lock.json') }}
cache: 'npm'
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build
run: npm run build
Expand All @@ -56,23 +46,18 @@ jobs:
- uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version: '14'
- uses: Brightspace/third-party-actions@actions/cache
id: cache
with:
path: '**/node_modules'
key: npm-${{ hashFiles('**/package-lock.json') }}
cache: 'npm'
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
run: |
npm ci
npm install karma-browserstack-launcher@1 --no-save
- name: Build
run: npm run build
- name: BrowserStack
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
run: |
npm install karma-browserstack-launcher@1 --no-save
npx karma start karma.bs.conf.js
run: npx karma start karma.bs.conf.js
sauce:
name: Unit Tests (SauceLabs)
timeout-minutes: 10
Expand All @@ -83,20 +68,15 @@ jobs:
- uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version: '14'
- uses: Brightspace/third-party-actions@actions/cache
id: cache
with:
path: '**/node_modules'
key: npm-${{ hashFiles('**/package-lock.json') }}
cache: 'npm'
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
run: |
npm ci
npm install karma-sauce-launcher@2 --no-save
- name: Build
run: npm run build
- name: SauceLabs
env:
SAUCE_USERNAME: Gaudi1
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY_GAUDI }}
run: |
npm install karma-sauce-launcher@2 --no-save
npx karma start karma.sauce.conf.js
run: npx karma start karma.sauce.conf.js
13 changes: 4 additions & 9 deletions .github/workflows/license-checker.yml
Expand Up @@ -10,15 +10,10 @@ jobs:
- uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version: '14'
- uses: Brightspace/third-party-actions@actions/cache
id: cache
with:
path: '**/node_modules'
key: npm-${{ hashFiles('**/package-lock.json') }}
cache: 'npm'
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Check License
run: |
npm ci
npm install d2l-license-checker@4 --no-save
npx d2l-license-checker -p
- name: Check License
run: npx d2l-license-checker -p
13 changes: 4 additions & 9 deletions .github/workflows/release.yml
Expand Up @@ -18,16 +18,11 @@ jobs:
- uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version: '14'
- uses: Brightspace/third-party-actions@actions/cache
id: cache
with:
path: '**/node_modules'
key: npm-${{ hashFiles('**/package-lock.json') }}
cache: 'npm'
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Install analyzer
run: npm i web-component-analyzer --no-save
run: |
npm ci
npm install web-component-analyzer --no-save
- name: Build
run: npm run build
- name: Create custom-elements.json
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/visual-diff.yml
Expand Up @@ -10,20 +10,14 @@ jobs:
- uses: Brightspace/third-party-actions@actions/setup-node
with:
node-version: '14'
- uses: Brightspace/third-party-actions@actions/cache
id: cache
with:
path: '**/node_modules'
key: npm-${{ hashFiles('**/package-lock.json') }}
cache: 'npm'
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build
run: npm run build
- name: Install ko
run: |
npm ci
sudo apt-get install language-pack-ko
sudo apt-get install korean*
- name: Build
run: npm run build
- name: Visual Diff Tests
uses: BrightspaceUI/actions/visual-diff@master
with:
Expand Down

0 comments on commit 8e76d8f

Please sign in to comment.