-
Notifications
You must be signed in to change notification settings - Fork 7
88 lines (76 loc) · 2.56 KB
/
run_test_cases.yaml
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
name: Run test cases
on: [push, pull_request]
jobs:
#windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v1
# - uses: ilammy/msvc-dev-cmd@v1
# - name: Run tests
# run: |
# set-executionpolicy remotesigned -s cu
# iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
# scoop bucket add extras https://github.com/lukesampson/scoop-extras.git
# $env:path + ";" + $env:USERPROFILE + "\scoop\shims"
# scoop update
# scoop install sudo curl 7zip ojdkbuild8 vcredist2013
# scoop install [email protected]
# $rebar3 = $env:USERPROFILE + "\rebar3"
# (New-Object System.Net.WebClient).DownloadFile('https://s3.amazonaws.com/rebar3/rebar3', $rebar3)
# ## Code dialyzer
# escript $rebar3 xref
# escript $rebar3 dialyzer
# ## Run tests
# escript $rebar3 ct
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Install compile env
run: |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install curl zip unzip gnu-sed erlang@22 [email protected]
echo "::add-path::/usr/local/opt/erlang@22/bin"
echo "::add-path::/usr/local/bin"
- name: install rebar3
run: |
curl -fsSL -o /usr/local/bin/rebar3 https://s3.amazonaws.com/rebar3/rebar3
chmod +x /usr/local/bin/rebar3
- name: Run tests
run: |
rebar3 ct
linux:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu18.04
- ubuntu16.04
- ubuntu14.04
- debian10
- debian9
- debian8
- opensuse
- centos7
- centos6
- raspbian10
- raspbian9
- raspbian8
steps:
- uses: actions/checkout@v1
- name: run test cases
env:
ERL_OTP: erl22.1
SYSTEM: ${{ matrix.os }}
run: |
version=$(echo ${{ github.ref }} | sed -r "s .*/.*/(.*) \1 g")
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
sudo docker run -i --name $SYSTEM -v $(pwd):/emqx_passwd emqx/build-env:$ERL_OTP-$SYSTEM sh -c "cd /emqx_passwd && rebar3 ct"
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: run test cases
env:
ERL_OTP: erl22.1
run: docker run -i --name alpine -v $(pwd):/emqx_passwd emqx/build-env:$ERL_OTP-alpine3.10-amd64 sh -c "cd /emqx_passwd && rebar3 ct"