Skip to content

Commit

Permalink
ci: all node version will try to test on http2
Browse files Browse the repository at this point in the history
  • Loading branch information
yunnysunny committed May 8, 2022
1 parent 5030b83 commit 44f8ae0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ jobs:
- node-version: 12.x
# test-on-brower: 1
- node-version: 14.x
# test-http2: 1
- node-version: 16.x
# test-http2: 1
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -48,7 +46,7 @@ jobs:
- name: Test On Node ${{ matrix.node-version }}
env:
BROWSER: ${{ matrix.test-on-brower }}
HTTP2_TEST: ${{ matrix.test-http2 }}
HTTP2_TEST_DISABLED: ${{ matrix.disable-htt2-test }}
OLD_NODE_TEST: ${{ matrix.test-on-old-node }}
run: |
if [ "$OLD_NODE_TEST" = "1" ]; then
Expand Down
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,22 @@ test:
fi

@if [ "$(NODE_TEST)" = "1" ] || [ "x$(BROWSER)" = "x" ]; then \
echo test on node; \
make test-node; \
@if [ "$(HTTP2_TEST_DISABLED)" != "1" ]; then \
echo test on node with htt2; \
export HTTP2_TEST="1" && make test-node; \
fi \
echo test on node with http1; \
export HTTP2_TEST="" && make test-node; \
fi

copy:
@if [ "$(OLD_NODE_TEST)" = "1" ]; then \
echo test on old node; \
cp test/node/fixtures lib/node/test/node -rf; \
else \
echo test on plain node; \
fi

test-node:copy
@NODE_ENV=test HTTP2_TEST=$(HTTP2_TEST) ./node_modules/.bin/nyc ./node_modules/.bin/mocha \
--require should \
Expand Down

0 comments on commit 44f8ae0

Please sign in to comment.