diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..caa1d22 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,16 @@ +name: Pull request + +on: + pull_request: + branches: [main] + # Add trigger for `ready_for_review` + # https://github.com/changesets/action/issues/187 + types: [opened, reopened, synchronize, ready_for_review] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + verify: + uses: ./.github/workflows/verification.yml diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml new file mode 100644 index 0000000..2e4c89f --- /dev/null +++ b/.github/workflows/verification.yml @@ -0,0 +1,14 @@ +name: Verification + +on: [workflow_call, workflow_dispatch] + +jobs: + verify: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup + - run: yarn prettier --check . + - run: yarn lint + - run: yarn build