From 43582360ec97c80165f8965716d3af00563dcc63 Mon Sep 17 00:00:00 2001 From: Lev Chelyadinov Date: Sat, 8 Jun 2024 20:17:07 +0200 Subject: [PATCH] Add a GitHub Actions workflow --- .github/actions/setup/action.yml | 18 ++++++++++++++++++ .github/workflows/quality.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/actions/setup/action.yml create mode 100644 .github/workflows/quality.yaml diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 0000000..446fa26 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,18 @@ +name: 'Setup and install' +description: 'Common setup steps for Actions' + +runs: + using: composite + steps: + - shell: bash + run: npm i -g pnpm@^9 turbo + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - uses: actions/checkout@v4 + + - shell: bash + run: pnpm install diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml new file mode 100644 index 0000000..b5fe6fe --- /dev/null +++ b/.github/workflows/quality.yaml @@ -0,0 +1,30 @@ +name: Quality + +on: + push: + branches: + - main + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + quality-checks: + name: Quality checks + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Run checks + run: | + turbo run check-formatting lint typecheck test + pnpm check-monorepo + + - name: Try building + run: turbo run build