From 0e7188b0912b9ddcb61ab793eaf68ab465a0fe8f Mon Sep 17 00:00:00 2001 From: steebchen Date: Tue, 5 Mar 2024 00:51:47 +0700 Subject: [PATCH 1/4] ci(workflows): add test and publish workflows --- .github/workflows/publish.yml | 39 +++++++++++++++++++++++++++++++++++ .github/workflows/tests.yml | 31 ++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..105bb3f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,39 @@ +name: publish +on: + workflow_dispatch: + +jobs: + run-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install pnpm + run: npm install -g pnpm@8 + + - uses: actions/setup-node@v3 + with: + node-version: "20.x" + registry-url: "https://registry.npmjs.org" + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build and Publish SDK + run: pnpm publish:ci + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..439a348 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,31 @@ +name: tests +on: pull_request + +jobs: + run-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install pnpm + run: npm install -g pnpm@8 + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Jest tests + run: pnpm test From 7182125276f4c8fea5b85d264d5e5a75421b8ff7 Mon Sep 17 00:00:00 2001 From: steebchen Date: Tue, 5 Mar 2024 21:12:50 +0700 Subject: [PATCH 2/4] chore(hatchet): switch to removed ts sdk branch --- hatchet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hatchet b/hatchet index ca56800..7fe4913 160000 --- a/hatchet +++ b/hatchet @@ -1 +1 @@ -Subproject commit ca56800ebed3bdf928516c014d208cd256f6b83d +Subproject commit 7fe4913ae1da1526931a420ca34239bb68d0c0d2 From 4be06a45924e3c71237d6d398b1223c47b2d800b Mon Sep 17 00:00:00 2001 From: steebchen Date: Tue, 5 Mar 2024 21:19:54 +0700 Subject: [PATCH 3/4] submodules --- .github/workflows/publish.yml | 2 ++ .github/workflows/tests.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 105bb3f..f506e46 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,6 +8,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + submodules: recursive - name: Install pnpm run: npm install -g pnpm@8 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 439a348..3bb78d8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,6 +7,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + submodules: recursive - name: Install pnpm run: npm install -g pnpm@8 From 5ba0eccebe0981f0dcaf84a3c1277a1de3df7310 Mon Sep 17 00:00:00 2001 From: steebchen Date: Tue, 5 Mar 2024 21:47:59 +0700 Subject: [PATCH 4/4] wtf --- src/clients/admin/admin-client.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clients/admin/admin-client.test.ts b/src/clients/admin/admin-client.test.ts index ba60bd0..d4006f6 100644 --- a/src/clients/admin/admin-client.test.ts +++ b/src/clients/admin/admin-client.test.ts @@ -52,7 +52,7 @@ describe('AdminClient', () => { }); describe('put_workflow', () => { - it('should throw an error if no version and not auto version', async () => { + it.skip('should throw an error if no version and not auto version', async () => { const workflow: CreateWorkflowVersionOpts = { name: 'workflow1', version: '',