Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(api-client): run api-client tests in ci #15083

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/react-api-client-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:

jobs:
js-unit-test:
name: 'react-api-client unit tests'
name: 'api-client and react-api-client unit tests'
timeout-minutes: 30
runs-on: 'ubuntu-22.04'
steps:
Expand All @@ -59,8 +59,8 @@ jobs:
npm config set cache ./.npm-cache
yarn config set cache-folder ./.yarn-cache
make setup-js
- name: 'run react-api-client unit tests'
run: make -C react-api-client test-cov
- name: 'run api-client and react-api-client unit tests'
run: make -C api-client test-cov
- name: 'Upload coverage report'
uses: codecov/codecov-action@v3
with:
Expand Down
12 changes: 11 additions & 1 deletion api-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# TODO(mc, 2021-02-12): this may be unnecessary by using `yarn run` instead
SHELL := bash

# These variables can be overriden when make is invoked to customize the
# behavior of jest
tests ?=
cov_opts ?= --coverage=true
test_opts ?=

# standard targets
#####################################################################

Expand All @@ -20,4 +26,8 @@ build:

.PHONY: test
test:
$(MAKE) -C .. test-js-api-client
$(MAKE) -C .. test-js-api-client tests="$(tests)" test_opts="$(test_opts)"

.PHONY: test-cov
test-cov:
make -C .. test-js-api-client tests=$(tests) test_opts="$(test_opts)" cov_opts="$(cov_opts)"
Loading