Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

fix(test): run javascript tests as a part of build CI job

Gabe Kangas2fcc84f0ef6f
diff --git a/.github/workflows/javascript-format-build.yml b/.github/workflows/javascript-format-test-build.yml
similarity index 98%
rename from .github/workflows/javascript-format-build.yml
rename to .github/workflows/javascript-format-test-build.yml
index 8a2ab2b3d3..b5a177628a 100644
--- a/.github/workflows/javascript-format-build.yml
+++ b/.github/workflows/javascript-format-test-build.yml
@@ -130,6 +130,10 @@ jobs:
- name: Check for unused JS code and dependencies
run: npx knip --include dependencies,files,exports
+ - name: Run tests
+ working-directory: ./web
+ run: npm test
+
# After any formatting and linting is complete we can run the build
# and bundle step. This both will verify that the build is successful as
# well as commiting the updated static files into the repository for use.
diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml
deleted file mode 100644
index 7289ccd2c7..0000000000
--- a/.github/workflows/javascript-tests.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-name: Javascript Tests
-
-on:
- push:
- paths:
- - 'web/**'
- pull_request:
- paths:
- - 'web/**'
-
-jobs:
- jest-run:
- runs-on: ubuntu-latest
- steps:
- - id: skip_check
- uses: fkirc/skip-duplicate-actions@v5
- with:
- concurrent_skipping: 'same_content_newer'
-
- - name: Check out pull request code
- uses: actions/checkout@v4
- if: github.event_name == 'pull_request'
- with:
- repository: ${{ github.event.pull_request.head.repo.full_name }}
-
- - name: Check out repository code
- uses: actions/checkout@v4
- if: github.event_name == 'push'
-
- - uses: actions/setup-node@v4
- with:
- node-version: 18.9.0
-
- - name: Cache node modules
- uses: actions/cache@v4
- env:
- cache-name: cache-node-modules-javascript-tests
- with:
- path: ~/.npm
- key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('web/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-build-${{ env.cache-name }}-
- ${{ runner.os }}-build-
- ${{ runner.os }}-
-
- - name: Install Dependencies
- working-directory: ./web
- run: npm install
-
- - name: Run tests
- working-directory: ./web
- run: npm test