Skip to content

Commit

Permalink
[core] Add GitHub workflows (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova authored Apr 19, 2024
1 parent ed19473 commit 2a82094
Show file tree
Hide file tree
Showing 24 changed files with 960 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: mui-org
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/@mui/material
custom: # Replace with a single custom sponsorship URL
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/1.bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bug report 🐛
description: Create a bug report for Pigment CSS.
labels: ['status: waiting for maintainer']
body:
- type: markdown
attributes:
value: Thanks for contributing by creating an issue! ❤️ Please provide a searchable summary of the issue in the title above ⬆️.
- type: input
attributes:
label: Search keywords
description: |
Your issue may have already been reported! First search for duplicates among the [existing issues](https://github.com/mui/pigment-css/issues?q=is%3Aopen+is%3Aclosed).
If your issue isn't a duplicate, great! Please list the keywords you used so people in the future can find this one more easily:
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: |
**⚠️ Issues that we can't reproduce can't be fixed.**
Please provide a link to a live example and an unambiguous set of steps to reproduce this bug.
Link to live example: (required)
Steps:
1.
2.
3.
- type: textarea
attributes:
label: Current behavior
description: Describe what happens instead of the expected behavior.
- type: textarea
attributes:
label: Expected behavior
description: Describe what should happen.
- type: textarea
attributes:
label: Context
description: What are you trying to accomplish? Providing context helps us come up with a solution that is more useful in the real world.
- type: textarea
attributes:
label: Your environment
description: Run `npx @mui/envinfo` and post the results. If you encounter issues with TypeScript please include the used tsconfig.
value: |
<details>
<summary><code>npx @mui/envinfo</code></summary>
```
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
```
</details>
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/2.feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Feature request 💄
description: Suggest a new idea for Pigment CSS.
labels: ['status: waiting for maintainer']
body:
- type: markdown
attributes:
value: Thanks for contributing by creating an issue! ❤️ Please provide a searchable summary of the issue in the title above ⬆️.
- type: input
attributes:
label: Search keywords
description: |
Your issue may have already been reported! First search for duplicates among the [existing issues](https://github.com/mui/pigment-css/issues?q=is%3Aopen+is%3Aclosed).
If your issue isn't a duplicate, great! Please list the keywords you used so people in the future can find this one more easily:
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true
- type: textarea
attributes:
label: Summary
description: Describe how it should work.
- type: textarea
attributes:
label: Examples
description: Provide a link to other implementations, or screenshots of the expected behavior.
- type: textarea
attributes:
label: Motivation
description: What are you trying to accomplish? Providing context helps us come up with a solution that is more useful in the real world.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/3.rfc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: RFC 💬
description: Request for comments for your proposal.
title: '[RFC] '
labels: ['status: waiting for maintainer', 'RFC']
body:
- type: markdown
attributes:
value: |
Please provide a searchable summary of the RFC in the title above. ⬆️
Thanks for contributing by creating an RFC! ❤️
- type: textarea
attributes:
label: What's the problem?
description: Write a short paragraph or bulleted list to briefly explain what you're trying to do, what outcomes you're aiming for.
- type: textarea
attributes:
label: What are the requirements?
description: Provide a list of requirements that should be met by the accepted proposal.
- type: textarea
attributes:
label: What are our options?
description: What are the alternative options to achieve the desired outcome?
- type: textarea
attributes:
label: Proposed solution
description: |
This is the core of the RFC. Please clearly explain the reasoning behind your proposed solution, including why it would be preferred over possible alternatives.
Consider:
- using diagrams to help illustrate your ideas
- including code examples if you're proposing an interface or system contract
- linking to relevant project briefs or wireframes
- type: textarea
attributes:
label: Resources and benchmarks
description: Attach any issues, PRs, links, documents, etc… that might be relevant to the RFC.
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/4.docs-feedback.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docs feedback
description: Improve documentation about Pigment CSS.
labels: ['status: waiting for maintainer', 'support: docs-feedback']
title: '[docs] '
body:
- type: markdown
attributes:
value: Thanks for contributing by creating an issue! ❤️ Please provide a searchable summary of the issue in the title above ⬆️.
- type: input
attributes:
label: Search keywords
description: |
Your issue may have already been reported! First search for duplicates among the [existing issues](https://github.com/mui/pigment-css/issues?q=is%3Aopen+is%3Aclosed).
If your issue isn't a duplicate, great! Please list the keywords you used so people in the future can find this one more easily:
validations:
required: true
- type: input
id: page-url
attributes:
label: Related page
description: Which page of the documentation is this about?
placeholder: https://mui.com/
validations:
required: true
- type: dropdown
attributes:
label: Kind of issue
description: What kind of problem are you facing?
options:
- Unclear explanations
- Missing information
- Broken demo
- Other
validations:
required: true
- type: textarea
attributes:
label: Issue description
description: |
Let us know what went wrong when you were using this documentation and what we could do to improve it.
- type: textarea
attributes:
label: Context
description: What are you trying to accomplish? Providing context helps us come up with a solution that is more useful in the real world.
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/5.priority-support.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 'Priority Support: SLA ⏰'
description: I'm an MUI X Premium user and we have purchased the Priority Support add-on. I can't find a solution to my problem with Pigment CSS.
title: '[question] '
labels: ['status: waiting for maintainer', 'support: unknown']
body:
- type: markdown
attributes:
value: |
Please provide a searchable summary of the issue in the title above ⬆️.
- type: input
attributes:
label: Search keywords
description: |
Your issue may have already been reported! First search for duplicates among the [existing issues](https://github.com/mui/pigment-css/issues?q=is%3Aopen+is%3Aclosed).
If your issue isn't a duplicate, great! Please list the keywords you used so people in the future can find this one more easily:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true
- type: textarea
attributes:
label: The problem in depth
- type: textarea
attributes:
label: Your environment
description: Run `npx @mui/envinfo` and post the results. If you encounter issues with TypeScript please include the used tsconfig.
value: |
<details>
<summary>`npx @mui/envinfo`</summary>
```
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
```
</details>
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Support ❔
url: https://mui.com/getting-started/support/
about: I need support with Pigment CSS.
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!-- Thanks so much for your PR, your contribution is appreciated! ❤️ -->

- [ ] I have followed (at least) the [PR section of the contributing guide](https://github.com/mui/pigment-css/blob/HEAD/CONTRIBUTING.md#sending-a-pull-request).
1 change: 1 addition & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name: CodeQL configuration
20 changes: 20 additions & 0 deletions .github/workflows/check-if-pr-has-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check if PR has label

on:
pull_request:
types: [opened, reopened, labeled, unlabeled]

permissions: {}

jobs:
test-label-applied:
# Tests that label is added on the PR
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: mnajdova/github-action-required-labels@ca0df9249827e43aa4b4a0d25d9fe3e9b19b0705 # v2.1.0
with:
mode: minimum
count: 1
labels: ''
34 changes: 34 additions & 0 deletions .github/workflows/cherry-pick-next-to-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Cherry pick next to master

on:
pull_request_target:
branches:
- next
types: ['closed']

permissions: {}

jobs:
cherry_pick_to_master:
runs-on: ubuntu-latest
name: Cherry pick into master
permissions:
pull-requests: write
contents: write
if: ${{ contains(github.event.pull_request.labels.*.name, 'needs cherry-pick') && github.event.pull_request.merged == true }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Cherry pick and create the new PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: carloscastrojumo/github-cherry-pick-action@503773289f4a459069c832dc628826685b75b4b3 # v1.0.10
with:
branch: master
body: 'Cherry-pick of #{old_pull_request_id}'
cherry-pick-branch: ${{ format('cherry-pick-{0}', github.event.number) }}
title: '{old_title} (@${{ github.event.pull_request.user.login }})'
labels: |
cherry-pick
25 changes: 25 additions & 0 deletions .github/workflows/ci-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This workflow is a workaround for ci.yml to bypass the github checks
#
# Ref: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks
name: CI Check

on:
push:
branches-ignore:
- 'renovate/**'
pull_request:
paths:
- 'docs/**'
- 'examples/**'

permissions: {}

jobs:
test-dev:
if: ${{ github.actor != 'l10nbot' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- run: 'echo "No build required"'
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches-ignore:
# Renovate branches are always Pull Requests.
# We don't need to run CI twice (push+pull_request)
- 'renovate/**'
pull_request:
paths-ignore:
# should sync with ci-check.yml as a workaround to bypass github checks
- 'docs/**'
- 'examples/**'

permissions: {}

jobs:
# Tests dev-only scripts across all supported dev environments
test-dev:
# l10nbot does not affect dev scripts.
if: ${{ github.actor != 'l10nbot' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- run: echo "${{ github.actor }}"
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
# fetch all tags which are required for `pnpm release:changelog`
fetch-depth: 0
- name: Set up pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- name: Use Node.js 18.x
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18
cache: 'pnpm' # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies
- run: pnpm install
- run: pnpm build:ci
- run: pnpm release:changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm validate-declarations
- name: pnpm release:tag
run: |
git remote -v
pnpm release:tag --dryRun
Loading

0 comments on commit 2a82094

Please sign in to comment.