-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.53 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: test
on:
push:
branches:
- main
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_FEATURE_FLAGS: dependencygraph
jobs:
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4.1.7
- name: Init Submodule
run: git submodule update --init --recursive --depth 1
- name: Download h2spec
run: |
wget https://github.com/summerwind/h2spec/releases/download/v2.6.0/h2spec_linux_amd64.tar.gz
tar -xzf h2spec_linux_amd64.tar.gz
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: CMake config
run: >
cmake
-Bbuild
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build
run: cmake --build build --target NewHttpImpl
- name: Run
run: |
nohup ./build/NewHttpImpl &
sleep 3
./h2spec -p 9956 -j test.xml
# pkill NewHttpImpl
- name: Test report
uses: dorny/test-reporter@v1.9.1
if: success() || failure()
with:
name: test
path: test.xml
reporter: jest-junit