mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
ci: optimize checks.yaml
(#2179)
This commit is contained in:
parent
935a6a4bd4
commit
558404118d
1 changed files with 42 additions and 22 deletions
64
.github/workflows/checks.yml
vendored
64
.github/workflows/checks.yml
vendored
|
@ -1,40 +1,60 @@
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
- "docs/**"
|
||||||
|
- "examples/**"
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
- "docs/**"
|
||||||
|
- "examples/**"
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
lint:
|
||||||
runs-on: macos-latest-xlarge
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/cache@v4
|
- uses: actions/setup-node@v4
|
||||||
id: npm-cache
|
|
||||||
with:
|
with:
|
||||||
path: "**/node_modules"
|
node-version: "22.x"
|
||||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
|
cache: "npm"
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run lint
|
||||||
|
|
||||||
- name: Install dependencies
|
test:
|
||||||
run: npm install
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "22.x"
|
||||||
|
cache: "npm"
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run test
|
||||||
|
|
||||||
- name: Run lint
|
types:
|
||||||
run: npm run lint
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
- name: Unit tests
|
- uses: actions/checkout@v4
|
||||||
run: npm run test
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
- name: Test generated source types
|
node-version: "22.x"
|
||||||
run: npm run test:src-types
|
cache: "npm"
|
||||||
|
- run: npm ci
|
||||||
- name: Test types
|
- run: npm run test:src-types
|
||||||
run: npm run test:types
|
- run: npm run test:types
|
||||||
|
|
||||||
|
deploy-docs:
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
needs: [lint, test, types]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
- name: Trigger deploy
|
- name: Trigger deploy
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
env:
|
env:
|
||||||
deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }}
|
deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }}
|
||||||
run: |
|
run: curl -f "$deploy_url"
|
||||||
curl "$deploy_url"
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue