From 2d4ff97fc0204c6fad827a4abe07c7526cc467a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ti=E1=BA=BFn=20Nguy=E1=BB=85n=20Kh=E1=BA=AFc?= Date: Fri, 9 Aug 2024 10:46:51 +1200 Subject: [PATCH] ci: add verification workflow (#19) --- .github/workflows/pull-request.yml | 16 ++++++++++++++++ .github/workflows/verification.yml | 14 ++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/pull-request.yml create mode 100644 .github/workflows/verification.yml 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