Skip to content

Commit

Permalink
update branch policies and pipelines for pull requests on archive (#6920
Browse files Browse the repository at this point in the history
)

* update branch policies and pipelines for pull requests on archive

* setup node

* remove code climate

---------

Co-authored-by: Christopher Holt <=>
  • Loading branch information
chrisdholt authored Mar 6, 2024
1 parent 8a2bf65 commit 2bebec0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/ci-validate-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Validate Platforms/Browsers
on:
push:
branches:
- master
- archives/fast-element-1

pull_request:
branches:
- master
- archives/fast-element-1

schedule:
- cron: 0 7 * * 3
Expand All @@ -34,9 +34,13 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@v2

- uses: actions/setup-node@v3
with:
node-version: 16.20.0

- if: ${{ github.event_name == 'pull_request' }}
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/master:refs/remotes/origin/master
git fetch --no-tags --prune --depth=1 origin +refs/heads/archives/fast-element-1:refs/remotes/origin/archives/fast-element-1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down Expand Up @@ -65,18 +69,18 @@ jobs:

- name: Run tests in changed packages
if: ${{ github.event_name == 'pull_request' }}
run: yarn lerna run test --stream --since=origin/master
run: yarn lerna run test --stream --since=origin/archives/fast-element-1

- name: Run tests in all Lerna Packages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/archives/fast-element-1' }}
run: yarn lerna run test --stream

- name: Initialize CodeQL
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/archives/fast-element-1' }}
uses: github/codeql-action/init@v1
with:
languages: javascript, typescript

- name: Perform CodeQL Analysis
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/archives/fast-element-1' }}
uses: github/codeql-action/analyze@v1
21 changes: 6 additions & 15 deletions .github/workflows/ci-validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Validate PRs
on:
push:
branches:
- master
- archives/fast-element-1
- releases/*
pull_request:
branches:
- master
- archives/fast-element-1
- releases/*
- features/*

Expand All @@ -20,6 +20,10 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: 16.20.0

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo '::set-output name=dir::$(yarn cache dir)'
Expand Down Expand Up @@ -51,18 +55,5 @@ jobs:
- name: Testing unit tests
run: yarn lerna run test --stream

- name: Collect and upload code coverage to Code Climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: 08a773cb4ea5811add5a45e12873e5cd2634c005568705cc37abfd5217617a32
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
coverageCommand: yarn lerna run coverage
coverageLocations: |
${{github.workspace}}/packages/tooling/fast-figma-plugin-msft/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-colors/coverage/lcov.info:lcov
${{github.workspace}}/packages/utilities/fast-eslint-rules/coverage/lcov.info:lcov
debug: false

- name: Testing final validation
run: yarn test:validation
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"files.insertFinalNewline": false
},
"[markdown]": {
"editor.quickSuggestions": false,
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "off"
},
"editor.wordWrap": "off",
"editor.wordWrapColumn": 90,
"files.insertFinalNewline": false,
Expand Down

0 comments on commit 2bebec0

Please sign in to comment.