From 86886031788dfd03aff7ea8b537807e55d2dd261 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Fri, 3 May 2024 20:52:44 +0200 Subject: [PATCH] Add test workflow --- .github/workflows/config-test.yml | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/config-test.yml diff --git a/.github/workflows/config-test.yml b/.github/workflows/config-test.yml new file mode 100644 index 0000000..275fc20 --- /dev/null +++ b/.github/workflows/config-test.yml @@ -0,0 +1,45 @@ +name: config - test + +on: + pull_request: {} + +jobs: + check: + name: Check if files modified + runs-on: ubuntu-latest + outputs: + checked: ${{ steps.changed-files.outputs.any_modified }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v42 + with: + files: | + packages/config/** + + lint: + name: Testing + runs-on: ubuntu-latest + needs: [check] + if: needs.check.outputs.checked == 'true' + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v3 + with: + version: 8 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: Install pnpm packages + working-directory: packages/config + run: pnpm install --frozen-lockfile + + - name: Test + working-directory: packages/config + run: pnpm test