-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from stacks-network/feat/mutation-testing
Add custom CI to run mutation testing completely manually by users from a given team
- Loading branch information
Showing
16 changed files
with
2,649 additions
and
10 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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Ignore built files | ||
dist | ||
build | ||
|
||
# Ignore node_modules | ||
node_modules | ||
|
||
# Ignore coverage reports | ||
coverage | ||
|
||
# Ignore configuration files | ||
*.config.js |
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,19 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"es2021": true | ||
}, | ||
"extends": ["eslint:recommended"], | ||
"parserOptions": { | ||
"ecmaVersion": 2021, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"indent": ["error", 2], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "single"], | ||
"semi": ["error", "always"], | ||
"no-unused-vars": ["warn"], | ||
"no-console": ["warn", { "allow": ["warn", "error"] }] | ||
} | ||
} |
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 @@ | ||
node_modules/ |
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,16 @@ | ||
# Ignore artifacts: | ||
dist | ||
build | ||
coverage | ||
|
||
# Ignore all HTML files: | ||
*.html | ||
|
||
# Ignore node_modules | ||
node_modules | ||
|
||
# Ignore all markdown files: | ||
*.md | ||
|
||
# Ignore package-lock.json | ||
package-lock.json |
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,8 @@ | ||
{ | ||
"semi": true, | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"useTabs": 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# TeamMembership action | ||
|
||
Check if the specified user belongs to a given team. | ||
|
||
It emits one outputs which are available via the `steps` [output context](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context) | ||
|
||
## Documentation | ||
|
||
### Inputs | ||
| Input | Description | Required | Default | | ||
| ------------------------------- | ----------------------------------------------------- | ------------------------- | ------------------------- | | ||
| `organization` | Organization name | false | repo owner | | ||
| `username` | Username to check team membership | true | | | ||
| `team` | Team to check the membership | true | | | ||
|
||
### Outputs | ||
| Output | Description | | ||
| ------------------------------- | ----------------------------------------------------- | | ||
| `is_team_member` | A boolean indicating if a user belongs to a given team | ||
|
||
|
||
## Usage | ||
|
||
```yaml | ||
name: Action | ||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
check-right-permissions: | ||
name: Check Right Permissions To Trigger This | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Right Permissions To Trigger This | ||
id: check_right_permissions | ||
uses: stacks-network/actions/stacks-core/team-membership@main | ||
with: | ||
username: ${{ github.actor }} | ||
team: 'Admin' | ||
|
||
- name: Fail if the user does not have the right permissions | ||
if: ${{ steps.check_right_permissions.outputs.is_team_member != 'true' }} | ||
run: exit 1 | ||
|
||
- name: Proceed if the user has the right permissions | ||
if: ${{ steps.check_right_permissions.outputs.is_team_member == 'true' }} | ||
run: echo "User has the right permissions." | ||
``` |
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,27 @@ | ||
name: 'team-membership' | ||
description: 'Check if a user has membership in a specific team within an organization' | ||
branding: | ||
icon: 'check' | ||
color: 'gray-dark' | ||
inputs: | ||
organization: | ||
description: 'Organization name (default is repo owner)' | ||
required: false | ||
default: ${{ github.repository_owner }} | ||
username: | ||
description: 'Username to get teams or check team membership' | ||
required: true | ||
team: | ||
description: 'Team to check the membership' | ||
required: true | ||
GITHUB_TOKEN: | ||
description: 'GITHUB_TOKEN' | ||
required: true | ||
|
||
outputs: | ||
is_team_member: | ||
description: 'Boolean indicating whether the user is a member of the specified team' | ||
|
||
runs: | ||
using: 'node20' | ||
main: 'dist/index.js' |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.