-
Notifications
You must be signed in to change notification settings - Fork 25
64 lines (51 loc) · 1.75 KB
/
tests.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
name: Test
on: [push, pull_request]
env:
LIBEXPAT_DOWNLOAD_URL: https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.gz
jobs:
tests:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
name: Busted Tests
strategy:
matrix:
openresty_version:
- 1.17.8.2
- 1.19.9.1
runs-on: ubuntu-latest
container:
image: openresty/openresty:${{ matrix.openresty_version }}-alpine-fat
# --init runs tinit as PID 1 and prevents the 'WARNING: killing the child process' spam from the test suite
options: --init
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
apk add --no-cache curl perl bash wget git perl-dev libarchive-tools nodejs jq
ln -s /usr/bin/bsdtar /usr/bin/tar
- name: Build libexpat
if: matrix.openresty_version == '1.17.8.2'
run: |
mkdir -p /tmp/expat
curl -Ls $LIBEXPAT_DOWNLOAD_URL | tar -xz --strip-components=1 -f - -C /tmp/expat
cd /tmp/expat && ./configure && make && make install
- name: Install libexpat from package manager
if: matrix.openresty_version == '1.19.9.1'
run: |
apk add --no-cache expat-dev
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cache
key: ${{ runner.os }}-${{ matrix.openresty_version }}-cache
- name: Install Busted
run: |
/usr/local/openresty/luajit/bin/luarocks install busted
/usr/local/openresty/luajit/bin/luarocks install luatz
/usr/local/openresty/luajit/bin/luarocks install luasocket
- uses: actions/checkout@v2
- name: Run tests
run: |
make dev
/usr/local/openresty/luajit/bin/luarocks make
busted