-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into refactor/update-components-to-use-prefix
- Loading branch information
Showing
113 changed files
with
1,361 additions
and
635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
name: v10 - ci | ||
on: | ||
push: | ||
branches: | ||
- v10 | ||
pull_request: | ||
branches: | ||
- v10 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
dedupe: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: v10 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
- name: Run yarn dedupe | ||
run: yarn dedupe --check | ||
|
||
format: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: v10 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
- name: Install dependencies | ||
run: yarn install --immutable --immutable-cache | ||
- name: Check formatting of project files | ||
run: yarn format:diff | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: v10 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
- name: Install dependencies | ||
run: yarn install --immutable --immutable-cache | ||
- name: Lint JavaScript files | ||
run: yarn lint | ||
- name: Lint Sass files | ||
run: yarn lint:styles | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: v10 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
- uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: | | ||
node_modules | ||
*/**/node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install dependencies | ||
run: yarn install --immutable --immutable-cache | ||
- name: Build project | ||
run: yarn build --ignore '@carbon/sketch' | ||
- name: Check generated styles | ||
run: | | ||
yarn carbon-cli check --ignore '**/@(node_modules|examples|components|react|fixtures|compat)/**' 'packages/**/*.scss' | ||
- name: Run tests | ||
run: yarn test --ci | ||
|
||
e2e: | ||
name: 'test:e2e' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: v10 | ||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
- uses: actions/[email protected] | ||
id: cache | ||
with: | ||
path: | | ||
node_modules | ||
*/**/node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
- name: Install dependencies | ||
run: yarn install --immutable --immutable-cache | ||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: | | ||
e2e: | ||
- 'e2e/**' | ||
- 'packages/icons/**' | ||
- 'packages/icons-react/**' | ||
- 'packages/icons-vue/**' | ||
- 'packages/pictograms/**' | ||
- 'packages/pictograms-react/**' | ||
- 'packages/icon-build-helpers/**' | ||
- name: Build project | ||
if: ${{ steps.filter.outputs.e2e == 'true' }} | ||
run: yarn build --ignore '@carbon/sketch' | ||
- name: Run e2e tests | ||
if: ${{ steps.filter.outputs.e2e == 'true' }} | ||
run: yarn test:e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: v10 - Release | ||
|
||
on: | ||
push: | ||
tags: | ||
# Push events to matching v10*, i.e. v10.55.0, v10.55.1 | ||
- 'v10*' | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: v10 | ||
|
||
- name: Use Node.js 16.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable --immutable-cache --check-cache | ||
|
||
- name: Build project | ||
run: yarn build | ||
|
||
- name: Run Continuous Integration checks | ||
run: yarn ci-check | ||
|
||
- name: Publish packages under the `next` dist tag | ||
run: yarn lerna publish from-package --dist-tag next --yes | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Prepare artifacts for release | ||
run: | | ||
zip -r --junk-paths carbon-elements.sketchplugin.zip packages/sketch/carbon-elements.sketchplugin | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: true | ||
|
||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./carbon-elements.sketchplugin.zip | ||
asset_name: carbon-elements.sketchplugin.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright IBM Corp. 2018, 2018 | ||
* | ||
* This source code is licensed under the Apache-2.0 license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @jest-environment node | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const { files } = require('@carbon/styles/files'); | ||
const { SassRenderer } = require('@carbon/test-utils/scss'); | ||
|
||
const { render } = SassRenderer.create(__dirname); | ||
|
||
const relativePaths = files.map((file) => { | ||
return file.relativePath; | ||
}); | ||
|
||
describe('@carbon/react/scss', () => { | ||
describe.each(relativePaths)('%s', (relativePath) => { | ||
it('should be importable', async () => { | ||
await expect( | ||
render(`@use '../${relativePath}' as test;`) | ||
).resolves.toBeDefined(); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// Copyright IBM Corp. 2018, 2018 | ||
// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// Copyright IBM Corp. 2018, 2018 | ||
// | ||
// This source code is licensed under the Apache-2.0 license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components'; |
9 changes: 9 additions & 0 deletions
9
packages/carbon-react/scss/components/accordion/_accordion.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// Copyright IBM Corp. 2018, 2018 | ||
// | ||
// This source code is licensed under the Apache-2.0 license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/accordion/accordion'; |
9 changes: 9 additions & 0 deletions
9
packages/carbon-react/scss/components/aspect-ratio/_aspect-ratio.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// Copyright IBM Corp. 2018, 2018 | ||
// | ||
// This source code is licensed under the Apache-2.0 license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/aspect-ratio/aspect-ratio'; |
9 changes: 9 additions & 0 deletions
9
packages/carbon-react/scss/components/breadcrumb/_breadcrumb.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// Copyright IBM Corp. 2018, 2018 | ||
// | ||
// This source code is licensed under the Apache-2.0 license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/breadcrumb/breadcrumb'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// Copyright IBM Corp. 2018, 2018 | ||
// | ||
// This source code is licensed under the Apache-2.0 license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/button/button'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// Copyright IBM Corp. 2018, 2018 | ||
// | ||
// This source code is licensed under the Apache-2.0 license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/button/tokens'; |
9 changes: 9 additions & 0 deletions
9
packages/carbon-react/scss/components/checkbox/_checkbox.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// Copyright IBM Corp. 2018, 2018 | ||
// | ||
// This source code is licensed under the Apache-2.0 license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/checkbox/checkbox'; |
9 changes: 9 additions & 0 deletions
9
packages/carbon-react/scss/components/code-snippet/_code-snippet.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Code generated by @carbon/react. DO NOT EDIT. | ||
// | ||
// Copyright IBM Corp. 2018, 2018 | ||
// | ||
// This source code is licensed under the Apache-2.0 license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
|
||
@forward '@carbon/styles/scss/components/code-snippet/code-snippet'; |
Oops, something went wrong.