forked from microsoft/fast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug: update to fix windows failing ci validation (microsoft#4217)
# Description Cross Platform Validation <!--- Describe your changes. --> Changed made to 1. modified prettier:diff to prettier check and write in the package.json file added run prepare workspace. 2. ON windows we have added this script to resolve the line ending run: | git config --global core.autocrlf false git config --global core.eol lf we have also specify the shell script as bash cmd in the workflow so the string can be treated as in Linux shel: bash 3. dangerouslySetInnerHTML={{ __html: FooterTemplate }} get replaced by dangerouslySetInnerHTML={{ __html: FooterTemplate() }} to resolve a units test that was failing. changed made in sites/fast-color-explorer/app/site-footer.tsx ## Motivation & context <!--- What problem does this change solve? --> This fix os validation on windows and mac closes microsoft#4058 <!--- Provide a link if you are addressing an open issue. --> ## Issue type checklist <!--- What type of change are you submitting? Put an x in the box that applies: --> - [ ] **Chore**: A change that does not impact distributed packages. - [x] **Bug**: A change that fixes an issue, link to the issue above. - [ ] **New feature**: A change that adds functionality. **Is this a breaking change?** - [ ] This change causes current functionality to break. <!--- If yes, describe the impact. --> **Adding or modifying component(s) in `@microsoft/fast-components` checklist** <!-- Do your changes add or modify components in the @microsoft/fast-components package? Put an x in the box that applies: --> - [ ] I have added a new component - [ ] I have modified an existing component - [ ] I have updated the [definition file](https://github.com/Microsoft/fast/blob/master/packages/web-components/fast-components/CONTRIBUTING.md#definition) - [ ] I have updated the [configuration file](https://github.com/Microsoft/fast/blob/master/packages/web-components/fast-components/CONTRIBUTING.md#configuration) ## Process & policy checklist <!--- Review the list and check the boxes that apply. --> - [x] I have added tests for my changes. - [x] I have tested my changes. - [x] I have updated the project documentation to reflect my changes. - [x] I have read the [CONTRIBUTING](https://github.com/Microsoft/fast/blob/master/CONTRIBUTING.md) documentation and followed the [standards](https://www.fast.design/docs/community/code-of-conduct/#our-standards) for this project. <!--- Formatting guidelines: Accepted peer review title format: <type>: <description> Example titles: chore: add unit tests for all components feat: add a border radius to button fix: update design system to use 3px border radius <type> is required to be one of the following: - chore: A change that does not impact distributed packages. - fix: A change which fixes an issue. - feat: A that adds functionality. <description> is required for the CHANGELOG and speaks to what the user gets from this PR: - Be concise. - Use all lowercase characters. - Use imperative, present tense (e.g. `add` not `adds`.) - Do not end your description with a period. - Avoid redundant words. For additional information regarding working on FAST, check out our documentation site: https://www.fast.design/docs/community/contributor-guide --> Co-authored-by: Ibrahimmaga <ibrahim.maga@yahoo.fr> Co-authored-by: John Kreitlow <john.kreitlow@microsoft.com> Co-authored-by: John Kreitlow <863023+radium-v@users.noreply.github.com>
- Loading branch information
1 parent
554760e
commit 057582a
Showing
11 changed files
with
184 additions
and
251 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,170 @@ | ||
name: CI - FAST Validation | ||
|
||
on: | ||
push: | ||
braches: | ||
- master | ||
- releases/* | ||
- features/* | ||
schedule: | ||
- cron: 0 7 * * 3 | ||
|
||
|
||
|
||
jobs: | ||
build_windows: | ||
name: Validate on Windows | ||
runs-on: windows-latest | ||
env: | ||
GITHUB_SERVICE_PAT: ${{sercrets.GH_PAT}} | ||
build_linux: | ||
runs-on: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2.1.0 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo '::set-output name=dir::$(yarn cache dir)' | ||
|
||
- name: Set up node_modules cache | ||
uses: actions/cache@v1.1.2 | ||
id: yarn-cache | ||
with: | ||
node-version: '10' | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Lerna | ||
run: npm i -g lerna | ||
- name: Install package dependencies | ||
run: yarn install --frozen-lockfile --ignore-scripts | ||
|
||
- name: Install package dependencies / prepare workspaces | ||
run: | | ||
yarn install --frozen-lockfile | ||
- name: Prepare workspaces | ||
run: yarn prepare | ||
|
||
- name: Ensure Prettier formatting | ||
run: lerna run prettier:diff | ||
- name: Testing Prettier format | ||
run: yarn format:check | ||
|
||
- name: Execute unit tests | ||
run: lerna run test --stream | ||
- name: Testing unit tests | ||
run: yarn lerna run test --stream | ||
|
||
|
||
build_macos: | ||
name: Validate on MacOS | ||
|
||
runs-on: macos-latest | ||
- name: Collect and upload code coverage to Code Climate | ||
uses: paambaati/codeclimate-action@v2.6.0 | ||
|
||
env: | ||
CC_TEST_REPORTER_ID: 08a773cb4ea5811add5a45e12873e5cd2634c005568705cc37abfd5217617a32 | ||
with: | ||
coverageCommand: yarn lerna run coverage | ||
coverageLocations: | | ||
${{github.workspace}}/packages/tooling/fast-tooling/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/tooling/fast-tooling-react/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/tooling/fast-tooling-wasm/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/tooling/fast-figma-plugin-msft/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-animation/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-colors/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-web-utilities/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-eslint-rules/coverage/lcov.info:lcov | ||
${{github.workspace}}/sites/fast-component-explorer/coverage/lcov.info:lcov | ||
debug: false | ||
|
||
build-windows: | ||
runs-on: [windows-latest] | ||
|
||
steps: | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2.1.0 | ||
- name: Display the path | ||
run: echo $PATH | ||
shell: bash | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo '::set-output name=dir::$(yarn cache dir)' | ||
|
||
- name: Set up node_modules cache | ||
uses: actions/cache@v1.1.2 | ||
id: yarn-cache | ||
with: | ||
node-version: '10' | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install Lerna | ||
run: sudo yarn global add lerna | ||
- name: Install package dependencies | ||
run: yarn install --frozen-lockfile --ignore-scripts | ||
|
||
- name: Install package dependencies / prepare workspaces | ||
run: yarn install --frozen-lockfile | ||
- name: Prepare workspaces | ||
run: yarn prepare | ||
|
||
- name: Ensure Prettier formatting | ||
run: lerna run prettier:diff | ||
- name: Testing Prettier format | ||
run: yarn format:check | ||
|
||
- name: Execute unit tests | ||
run: lerna run test --stream | ||
- name: Testing unit tests | ||
run: yarn lerna run test --stream | ||
|
||
code_scan: | ||
name: Validate Security | ||
- name: Collect and upload code coverage to Code Climate | ||
uses: paambaati/codeclimate-action@v2.6.0 | ||
|
||
runs-on: ubuntu-latest | ||
env: | ||
CC_TEST_REPORTER_ID: 08a773cb4ea5811add5a45e12873e5cd2634c005568705cc37abfd5217617a32 | ||
with: | ||
coverageCommand: yarn lerna run coverage | ||
coverageLocations: | | ||
${{github.workspace}}/packages/tooling/fast-tooling/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/tooling/fast-tooling-react/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/tooling/fast-tooling-wasm/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/tooling/fast-figma-plugin-msft/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-animation/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-colors/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-web-utilities/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-eslint-rules/coverage/lcov.info:lcov | ||
${{github.workspace}}/sites/fast-component-explorer/coverage/lcov.info:lcov | ||
debug: false | ||
|
||
build-macos: | ||
runs-on: [macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo '::set-output name=dir::$(yarn cache dir)' | ||
|
||
- name: Set up node_modules cache | ||
uses: actions/cache@v1.1.2 | ||
id: yarn-cache | ||
with: | ||
languages: javascript | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install package dependencies | ||
run: yarn install --frozen-lockfile --ignore-scripts | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 | ||
- name: Prepare workspaces | ||
run: yarn prepare | ||
|
||
- name: Testing Prettier format | ||
run: yarn format:check | ||
|
||
- name: Testing unit tests | ||
run: yarn lerna run test --stream | ||
|
||
- name: Collect and upload code coverage to Code Climate | ||
uses: paambaati/codeclimate-action@v2.6.0 | ||
|
||
env: | ||
CC_TEST_REPORTER_ID: 08a773cb4ea5811add5a45e12873e5cd2634c005568705cc37abfd5217617a32 | ||
with: | ||
coverageCommand: yarn lerna run coverage | ||
coverageLocations: | | ||
${{github.workspace}}/packages/tooling/fast-tooling/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/tooling/fast-tooling-react/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/tooling/fast-tooling-wasm/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/tooling/fast-figma-plugin-msft/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-animation/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-colors/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-web-utilities/coverage/lcov.info:lcov | ||
${{github.workspace}}/packages/utilities/fast-eslint-rules/coverage/lcov.info:lcov | ||
${{github.workspace}}/sites/fast-component-explorer/coverage/lcov.info:lcov | ||
debug: false |
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 |
---|---|---|
|
@@ -66,4 +66,5 @@ docs/en/packages/*/api/ | |
|
||
# Ignore Build Artefacts | ||
bin/ | ||
obj/ | ||
obj/ | ||
|
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,2 +1,10 @@ | ||
packages/web-components/fast-components/src/default-palette.ts | ||
packages/web-components/fast-element/src/**/*.spec.ts | ||
*.spec.ts | ||
**/__test-images__ | ||
**/__tests__ | ||
**/.tmp | ||
**/bootstrap | ||
**/coverage | ||
**/dist | ||
**/temp | ||
default-palette.ts | ||
testData.ts |
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
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
Oops, something went wrong.