diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml index 9ead263f5..6c4027c04 100644 --- a/.github/workflows/run-test.yaml +++ b/.github/workflows/run-test.yaml @@ -30,33 +30,33 @@ jobs: working-directory: ./api run: | npm run test:cov - ui-test: - if: contains(github.event.pull_request.labels.*.name, 'ui') - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - with: - sparse-checkout: | - .github - ui - fetch-depth: 2 - - name: Tag baseRef - run: | - git tag baseRef HEAD^1 - - name: Read .nvmrc - working-directory: ./ui - run: | - echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT - id: nvm - - name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }} - uses: actions/setup-node@v3 - with: - node-version: ${{ steps.nvm.outputs.NODE_VERSION }} - - name: Install dependencies - working-directory: ./ui - run: | - yarn install --immutable - - name: Run UI unit tests on affected packages - working-directory: ./ui - run: | - yarn test:affected + # ui-test: + # if: contains(github.event.pull_request.labels.*.name, 'ui') + # runs-on: ubuntu-22.04 + # steps: + # - uses: actions/checkout@v4 + # with: + # sparse-checkout: | + # .github + # ui + # fetch-depth: 2 + # - name: Tag baseRef + # run: | + # git tag baseRef HEAD^1 + # - name: Read .nvmrc + # working-directory: ./ui + # run: | + # echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT + # id: nvm + # - name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }} + # uses: actions/setup-node@v3 + # with: + # node-version: ${{ steps.nvm.outputs.NODE_VERSION }} + # - name: Install dependencies + # working-directory: ./ui + # run: | + # yarn install --immutable + # - name: Run UI unit tests on affected packages + # working-directory: ./ui + # run: | + # yarn test:affected diff --git a/.github/workflows/ui-test.yaml b/.github/workflows/ui-test.yaml new file mode 100644 index 000000000..b2b77bac7 --- /dev/null +++ b/.github/workflows/ui-test.yaml @@ -0,0 +1,41 @@ +name: UI Test + +on: + pull_request: + branches: + - main + - 'develop' + paths: + - 'ui/**' + workflow_dispatch: + +jobs: + ui-test: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: | + .github + ui + fetch-depth: 2 + - name: Tag baseRef + run: | + git tag baseRef HEAD^1 + - name: Read .nvmrc + working-directory: ./ui + run: | + echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT + id: nvm + - name: Use Node.js ${{ steps.nvm.outputs.NODE_VERSION }} + uses: actions/setup-node@v3 + with: + node-version: ${{ steps.nvm.outputs.NODE_VERSION }} + - name: Install dependencies + working-directory: ./ui + run: | + yarn install --immutable + - name: Run UI unit tests on affected packages + working-directory: ./ui + run: | + yarn test:affected