-
Notifications
You must be signed in to change notification settings - Fork 241
[test] Testing PR 5222 - Test circleci migration #5280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8ef0a6e
fede87f
3fa10db
ff68bb1
a5d8221
0eb3ad0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| name: Build | ||
| # | ||
| # This workflow validates that the commit in question can be built successfully | ||
| # in several environments: | ||
| # | ||
| # Systems: Ubuntu, MacOS, Windows | ||
| # Node: 20 | ||
| # | ||
| # After the build is successful, the compiled assets are uploaded as an artifact | ||
| # to the workflow run. This allows us to download the compiled assets and use | ||
| # them in other workflows. | ||
| # | ||
| # Note: we need to skip the nx cache b/c it does not contain the compiled assets | ||
| # | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| system: | ||
| required: false | ||
| default: 'macos-latest' | ||
| node-version: | ||
| required: false | ||
| default: '20' | ||
| experimental: | ||
| required: false | ||
| default: 'false' | ||
| ref: | ||
| description: 'The branch or tag to checkout' | ||
| required: false | ||
| workflow_call: | ||
| inputs: | ||
| system: | ||
| required: false | ||
| type: string | ||
| default: 'macos-latest' | ||
| node-version: | ||
| required: false | ||
| type: string | ||
| default: '20' | ||
| experimental: | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| ref: | ||
| description: 'The branch or tag to checkout' | ||
| required: false | ||
| type: string | ||
| default: ${{ github.head_ref }} | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| # ---------- Validate build for various environments ---------- # | ||
| build: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| system: | ||
| - ${{ inputs.system }} | ||
| node-version: | ||
| - ${{ inputs.node-version }} | ||
| experimental: | ||
| - ${{ inputs.experimental }} | ||
| runs-on: ${{ matrix.system }} | ||
| continue-on-error: ${{ matrix.experimental }} | ||
| timeout-minutes: 10 | ||
| name: Build ${{ matrix.system }}, node v${{ matrix.node-version }} | ||
| steps: | ||
| - name: Checkout PR branch | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ inputs.ref || github.head_ref }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Job and Install Dependencies | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @castastrophe this job includes build do we need in the next step? |
||
| uses: ./.github/actions/setup-job | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Build the project | ||
| if: always() | ||
| run: yarn build | ||
|
|
||
| # This step will evaluate the repo status and report the change | ||
| # If there are changes, capture the changes and upload them as an artifact | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Im not seeing an artifact upload and in CI I looks like this hangs after exit 1 |
||
| - name: Check if there are changes | ||
| if: always() | ||
| run: | | ||
| if [[ -z $(git status --porcelain) ]]; then | ||
| echo "No changes detected" | ||
| exit 0 | ||
| else | ||
| echo "Changes detected" | ||
| git status | ||
| exit 1 | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: PR verification | ||
| # ------------------------------------------------------------- | ||
| # This workflow will build and verify pull requests. It will: | ||
| # - Build the branch and fail if the build fails | ||
| # - Run code coverage tests on the PR branch | ||
| # - Lint the PR branch | ||
| # ------------------------------------------------------------- | ||
|
|
||
| on: | ||
| merge_group: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - labeled | ||
| - unlabeled | ||
| - auto_merge_enabled | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| concurrency: | ||
| group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | ||
| cancel-in-progress: true | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| # ------------------------------------------------------------- | ||
| # Validate build for various environments | ||
| # ------------------------------------------------------------- | ||
| verify_builds: | ||
| name: Verify build | ||
| # Check that the PR is not in draft mode (or if it is, that it has the run_ci label to force a build) | ||
| if: ${{ github.event.pull_request.draft != 'true' || contains(github.event.pull_request.labels.*.name, 'run_ci') }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| system: | ||
| - macos-latest | ||
| - ubuntu-latest | ||
| # - windows-latest | ||
| node-version: | ||
| - 20 | ||
| uses: ./.github/workflows/build.yml | ||
| with: | ||
| system: ${{ matrix.system }} | ||
| node-version: ${{ matrix.node-version }} | ||
| secrets: inherit | ||
|
|
||
| coverage: | ||
| name: Code coverage | ||
| # Check that the PR is not in draft mode (or if it is, that it has the run_ci label to force a build) | ||
| if: ${{ github.event.pull_request.draft != 'true' || contains(github.event.pull_request.labels.*.name, 'run_ci') }} | ||
| uses: ./.github/workflows/coveralls.yml | ||
| secrets: inherit | ||
|
|
||
| # ------------------------------------------------------------- | ||
| # Lint pre-compiled assets for consistency | ||
| # ------------------------------------------------------------- | ||
| lint: | ||
| name: Lint | ||
| if: ${{ contains(github.event.pull_request.labels.*.name, 'skip_lint') == false }} | ||
| uses: ./.github/workflows/lint.yml | ||
| secrets: inherit |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: Lint | ||
| # | ||
| # This workflow lints the UI library and reports back any suggested fixes | ||
| # | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| # --- Lint pre-compiled assets for consistency --- # | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| outputs: | ||
| eslint_diff_files: ${{ steps.changed-files.outputs.eslint_diff_files }} | ||
| stylelint_diff_files: ${{ steps.changed-files.outputs.stylelint_diff_files }} | ||
| steps: | ||
| # install but don't build - we're linting pre-compiled assets | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 2 | ||
|
|
||
| - name: Setup Job and Install Dependencies | ||
| uses: ./.github/actions/setup-job | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this includes a build step. we might consider removing it from the setup and make jobs run build explicitly |
||
|
|
||
| - name: Check for changed files | ||
| id: changed-files | ||
| run: | | ||
| echo "eslint=$(git diff --name-only --diff-filter=d -- "projects/documentation/**/*.ts" "packages/**/*.ts" "tools/**/*.ts" | xargs)" >> $GITHUB_OUTPUT | ||
| echo "stylelint=$(git diff --name-only --diff-filter=d -- "packages/**/*.css" "tools/**/*.css" | xargs)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: echo eslint changed files | ||
| run: echo ${{ steps.changed-files.outputs.eslint }} | ||
|
|
||
| - name: echo stylelint changed files | ||
| run: echo ${{ steps.changed-files.outputs.stylelint }} | ||
|
|
||
| - name: Lint component styles | ||
| uses: reviewdog/[email protected] | ||
| if: ${{ steps.changed-files.outputs.stylelint != '' }} | ||
| with: | ||
| fail_level: error | ||
| filter_mode: diff_context | ||
| level: error | ||
| reporter: github-pr-review | ||
| stylelint_input: '${{ steps.changed-files.outputs.stylelint }}' | ||
| stylelint_config: '${{ github.workspace }}/.stylelintrc.json' | ||
|
|
||
| - name: Run eslint on packages and stories | ||
| uses: reviewdog/[email protected] | ||
| if: ${{ steps.changed-files.outputs.eslint != '' }} | ||
| with: | ||
| fail_level: error | ||
| level: error | ||
| reporter: github-pr-review | ||
| filter_mode: diff_context | ||
| eslint_flags: '${{ steps.changed-files.outputs.eslint }}' | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would like to know more about this job and if we can leverage it for other jobs if its pulling a cache like I think it is. could improve our run time ten-fold