From 7e6f61b122baf66b56d84dab26756548739aaff7 Mon Sep 17 00:00:00 2001 From: Narek Hovhannisyan Date: Tue, 6 Aug 2024 10:57:31 +0400 Subject: [PATCH] feat(.github): brake down worflow to multiple jobs --- .github/workflows/release-commit.yml | 38 +++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-commit.yml b/.github/workflows/release-commit.yml index efcf8726e..8ffa665f7 100644 --- a/.github/workflows/release-commit.yml +++ b/.github/workflows/release-commit.yml @@ -8,7 +8,7 @@ env: PRE_RELEASE: ${{ github.event.release.prerelease}} jobs: - release-commit-pr: + unit-tests: runs-on: ubuntu-latest steps: - name: Checkout code @@ -28,9 +28,45 @@ jobs: - name: Run unit tests run: npm test + integration-tests: + runs-on: ubuntu-latest + needs: unit-tests + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.repository.default_branch }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies + run: npm ci + - name: Run integration tests run: npm run if-check -- -d manifests/outputs + publish: + runs-on: ubuntu-latest + needs: integration-tests + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.repository.default_branch }} + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies + run: npm ci + - name: Initialize git user email run: git config --global user.email "${{ vars.RELEASE_USER_EMAIL }}"