From ac1add3de3b2cded587a48bbe8bc50473987875f Mon Sep 17 00:00:00 2001 From: Nemanja <31325167+nemanjaglumac@users.noreply.github.com> Date: Fri, 23 Feb 2024 22:56:15 +0100 Subject: [PATCH] Run FE workflow using bun --- .github/actions/prepare-frontend/action.yml | 12 ++---------- .github/workflows/frontend.yml | 16 ++++++++-------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/actions/prepare-frontend/action.yml b/.github/actions/prepare-frontend/action.yml index c00d2446c87700..fd32fb361a58ef 100644 --- a/.github/actions/prepare-frontend/action.yml +++ b/.github/actions/prepare-frontend/action.yml @@ -3,9 +3,7 @@ runs: using: "composite" steps: - name: Prepare Node.js - uses: actions/setup-node@v4 - with: - node-version-file: ".nvmrc" + uses: oven-sh/setup-bun@v1 - name: Check to see if dependencies should be cached if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }} run: | @@ -18,11 +16,5 @@ runs: with: path: ~/.m2 key: ${{ runner.os }}-cljs-${{ hashFiles('**/shadow-cljs.edn') }} - - name: Get node_modules cache - uses: actions/cache@v4 - if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }} - with: - path: node_modules - key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} - - run: yarn install --frozen-lockfile --prefer-offline + - run: bun install shell: bash diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 1096137bb25fcc..65a411aae1e7e6 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -43,11 +43,11 @@ jobs: with: m2-cache-key: "cljs" - name: Compile CLJS - run: yarn build-pure:cljs + run: bun build-pure:cljs - name: Run Prettier formatting linter - run: yarn run lint-prettier-pure + run: bun run lint-prettier-pure - name: Run ESLint linter - run: yarn run lint-eslint-pure + run: bun run lint-eslint-pure fe-type-check: needs: files-changed @@ -62,9 +62,9 @@ jobs: uses: ./.github/actions/prepare-backend with: m2-cache-key: "cljs" - - run: yarn build-pure:cljs + - run: bun build-pure:cljs name: Compile CLJS - - run: yarn type-check-pure + - run: bun type-check-pure name: Check types fe-tests-unit: @@ -85,10 +85,10 @@ jobs: m2-cache-key: "cljs" - name: Run frontend unit tests and collect the code coverage information if: github.ref_name == 'master' - run: yarn run test-unit --coverage --silent + run: bun run test-unit --coverage --silent - name: Run frontend unit tests if: github.ref_name != 'master' - run: yarn run test-unit --silent + run: bun run test-unit --silent - name: Upload coverage to codecov.io if: github.ref_name == 'master' uses: codecov/codecov-action@v3 @@ -121,4 +121,4 @@ jobs: with: m2-cache-key: "cljs" - name: Run frontend timezones tests - run: yarn run test-timezones + run: bun run test-timezones