-
-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (88 loc) · 3.27 KB
/
ci.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
test:
name: Nim ${{ matrix.nim }}
runs-on: ubuntu-latest
strategy:
matrix:
nim: [2.0.8, 2.2.0]
steps:
- uses: actions/checkout@v2
- name: Run Tests
run: |
docker pull nimlang/nim:${{ matrix.nim }}
docker run --env-file .env --rm -v `pwd`:/usr/src/app -w /usr/src/app nimlang/nim:${{ matrix.nim }} \
/bin/bash -c "git config --global --add safe.directory /usr/src/app && \
apt update && \
apt install -y make && \
make install_mkcert && \
nimble install -y && \
nimble test"
- name: Run Functional Tests
run: |
docker pull nimlang/nim:${{ matrix.nim }}
docker run --env-file .env --rm -v `pwd`:/usr/src/app -w /usr/src/app nimlang/nim:${{ matrix.nim }} \
/bin/bash -c "git config --global --add safe.directory /usr/src/app && \
apt update && \
apt install -y make && \
make install_mkcert && \
nimble install -y && \
(nimble funcserve &) && \
sleep 10s && \
nimble functest"
- name: Run Functional Insecure Tests
run: |
docker pull nimlang/nim:${{ matrix.nim }}
docker run --env-file .env --rm -v `pwd`:/usr/src/app -w /usr/src/app nimlang/nim:${{ matrix.nim }} \
/bin/bash -c "git config --global --add safe.directory /usr/src/app && \
nimble install -y && \
(nimble funcserveinsec &) && \
sleep 10s && \
nimble functestinsec"
- name: Run Examples
run: |
docker pull nimlang/nim:${{ matrix.nim }}
docker run --env-file .env --rm -v `pwd`:/usr/src/app -w /usr/src/app nimlang/nim:${{ matrix.nim }} \
/bin/bash -c "git config --global --add safe.directory /usr/src/app && \
apt update && \
apt install -y make && \
make install_mkcert && \
nimble install -y && \
(nimble serve2 &) && \
sleep 10s && \
nimble testexamples"
- name: Run h2spec
run: |
docker pull nimlang/nim:${{ matrix.nim }}
docker run --env-file .env --rm -v `pwd`:/usr/src/app -w /usr/src/app nimlang/nim:${{ matrix.nim }} \
/bin/bash -c "git config --global --add safe.directory /usr/src/app && \
apt update && \
apt install -y make && \
make install_mkcert && \
nimble install -y && \
(nimble serve2 &) && \
sleep 10s && \
curl -JLO \"https://github.com/nitely/nim-hyperx/releases/download/v0.1.20/h2spec\" && \
chmod +x ./h2spec && \
nimble h2spec && \
nimble h2spec && \
nimble h2spec"
- name: Run h2load
run: |
docker pull nimlang/nim:${{ matrix.nim }}
docker run --env-file .env --rm -v `pwd`:/usr/src/app -w /usr/src/app nimlang/nim:${{ matrix.nim }} \
/bin/bash -c "git config --global --add safe.directory /usr/src/app && \
apt update && \
apt install -y make && \
make install_mkcert && \
nimble install -y && \
(nimble serve2 &) && \
sleep 10s && \
apt install -y nghttp2-client && \
nimble h2load && \
nimble h2load2"