mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
ci: adjust run rules, use cache actions (#1081)
- adjust run rules to run on any pull request or a push to `master` - use action to cache install folder to speed up builds - run `build:api` and `build:lib` in parallel
This commit is contained in:
parent
63f52b4683
commit
4a197fdb7f
1 changed files with 16 additions and 3 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
@ -1,14 +1,27 @@
|
||||||
name: CI
|
name: CI
|
||||||
on: [pull_request]
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
|
with:
|
||||||
|
path: "**/node_modules"
|
||||||
|
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
|
||||||
- name: Install dependencies and build the library
|
- name: Install dependencies and build the library
|
||||||
run: |
|
run: |
|
||||||
yarn
|
yarn
|
||||||
yarn build:api
|
yarn build:api & yarn build:lib
|
||||||
yarn build:lib
|
|
||||||
- name: Run unit tests and validate TypeScript definitions
|
- name: Run unit tests and validate TypeScript definitions
|
||||||
run: yarn test
|
run: yarn test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue