From 4118ae01d1a18aeea8c9fc6829f71612d2e9414d Mon Sep 17 00:00:00 2001 From: Derek Croote Date: Mon, 26 Aug 2024 19:55:39 -0700 Subject: [PATCH] Add Actions workflow to check commons for breaking changes --- .github/workflows/check-against-commons | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/check-against-commons diff --git a/.github/workflows/check-against-commons b/.github/workflows/check-against-commons new file mode 100644 index 0000000..02c5112 --- /dev/null +++ b/.github/workflows/check-against-commons @@ -0,0 +1,43 @@ +name: Check Breaking Changes in Commons + +on: + pull_request: + branches: + - main + +jobs: + check-breaking-changes: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Package repository + run: pnpm pack + + - name: Checkout commons repository + uses: actions/checkout@v4 + with: + repository: api3dao/commons + path: commons + + - name: Install packaged version in commons + working-directory: commons + run: | + pnpm add -D file:${{ github.workspace }}/*.tgz + + - name: Run ESLint on commons + working-directory: commons + run: pnpm eslint .