Skip to content
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

chore(cypress): add github workflows #2

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/add-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Add Label
on:
pull_request:
types:
- opened
jobs:
add-label:
name: Add Label
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: christianvuerings/add-labels@v1
with:
labels: |
Missing dev review
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/avoid-typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: reviewdog
on:
pull_request:
types: [opened, synchronize, reopened, edited]

jobs:
misspell:
name: runner / misspell
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v4
- name: misspell
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
locale: "US"
reporter: github-pr-review
level: error
exclude: |
./node_modules/*
26 changes: 26 additions & 0 deletions .github/workflows/fix-typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Automatically fix typos
on:
push:
branches:
- dev

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: dev
- uses: sobolevn/misspell-fixer-action@master
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Check outputs of PR
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
31 changes: 31 additions & 0 deletions .github/workflows/lint-PR-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint Pull Request Title

on:
pull_request:
types:
- opened
- edited
- reopened

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions-ecosystem/action-regex-match@v2
id: regex-match
with:
text: ${{ github.event.pull_request.title }}
regex: '(?:add|update|screenobject|chore|test|fix)\([a-z-A-Z]+\):\s.+'

- uses: actions-ecosystem/action-create-comment@v1
if: ${{ steps.regex-match.outputs.match == '' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
body: |
:warning: The title of this PR is invalid.
Please make the title match the regex `(?:add|update|screenobject|chore|test|fix)\([a-z-A-Z]+\):\s.+`.
e.g.) `add(cli): enable --verbose flag`, `fix(api): avoid unexpected error in handler`
- run: exit 1
if: ${{ steps.regex-match.outputs.match == '' }}
14 changes: 14 additions & 0 deletions .github/workflows/remove-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Remove All Labels

on:
pull_request:
types: [closed]

jobs:
remove_labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rogerluan/label-remover@v1.0.1
with:
github_token: ${{ secrets.github_token }}
Loading