Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: using built-in caching from setup-node #1501

Merged
merged 1 commit into from Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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