-
Notifications
You must be signed in to change notification settings - Fork 701
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run formatting scripts during PR builds (#124)
### Motivation and Context <!-- Thank you for your contribution to the copilot-chat repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> brings in the renaming/consolidation changes from #60 and adds the format scripts to run as part of PR builds. hopefully one day we will have automated fixing of the formatting errors, but for now they must be fixed by the developer manually. ### Description - fixes all formatting errors. - updates READMEs to use relative links where possible since absolute links are not caught by `markdown-link-check`. - github workflows: - adds `copilot-format-frontend` which runs `yarn format` to check if formatting is correct. - renames `node-pr` to `copilot-build-frontend` and removes the `find-yarn-projects` job from the workflow. - removes `copilot-chat-package` in favor of `copilot-build-backend` since the two workflows seem identical. also changes `copilot-build-backend` to run `dotnet format`, and also run when PRs are created. <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [x] The code builds clean without any errors or warnings - [x] The PR follows the [Contribution Guidelines](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄
- Loading branch information
Showing
43 changed files
with
310 additions
and
345 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: copilot-build-frontend | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: ["main"] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
webapp: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
cache-dependency-path: "webapp/yarn.lock" | ||
|
||
- name: Run yarn install, yarn build, & yarn format | ||
run: | | ||
#!/bin/bash | ||
set -e # exit with nonzero exit code if anything fails | ||
echo "Running yarn install, yarn build, & yarn format" | ||
yarn install --frozen-lockfile # install dependencies and ensure lockfile is unchanged. | ||
yarn build # run build script | ||
yarn format # run format script | ||
working-directory: webapp |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ permissions: | |
contents: read | ||
|
||
jobs: | ||
test: | ||
e2e: | ||
defaults: | ||
run: | ||
working-directory: webapp | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.