-
Notifications
You must be signed in to change notification settings - Fork 9
82 lines (71 loc) · 2.74 KB
/
integration-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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Integration Tests
on:
push:
branches:
- main
pull_request:
jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Newest supported configuration
- go-version: '1.22' # pairs with TinyGo 0.31.2
tinygo-version: '0.31.2'
wasmtime-version: 'latest'
tinygo-wasi-target: 'wasi'
# Oldest supported configuration
- go-version: '1.21' # pairs with TinyGo 0.29.0
tinygo-version: '0.29.0'
wasmtime-version: '21.0.1' # pairs with TinyGo 0.29.0
tinygo-wasi-target: 'wasi'
- go-version: '1.23' # pairs with TinyGo 0.33.0
tinygo-version: '0.33.0'
wasmtime-version: '21.0.1' # pairs with TinyGo 0.33.0
tinygo-wasi-target: 'wasip1'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- uses: ./.github/actions/install-tinygo
with:
tinygo-version: ${{ matrix.tinygo-version }}
- name: Setup Fastly CLI
uses: fastly/compute-actions/setup@v7
- name: Install Viceroy ${{ env.VICEROY_VERSION }}
shell: 'bash'
env:
VICEROY_VERSION: 0.10.2
run: |
echo "Install Viceroy ${{ env.VICEROY_VERSION }}..."
wget --no-verbose https://github.com/fastly/Viceroy/releases/download/v${{ env.VICEROY_VERSION }}/viceroy_v${{ env.VICEROY_VERSION }}_linux-amd64.tar.gz
mkdir -p $HOME/bin
tar -xzf viceroy_v${{ env.VICEROY_VERSION }}_linux-amd64.tar.gz --directory $HOME/bin
echo "$HOME/bin" >> $GITHUB_PATH
- name: Set up Wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: ${{ matrix.wasmtime-version }}
- name: Check our dependencies
run: |
go version
tinygo version
fastly version
viceroy --version
wasmtime --version
- name: Tests - Go
run: go test -race -tags="fastlyinternaldebug nofastlyhostcalls" ./...
- name: Tests - TinyGo
run: tinygo test -target=${{ matrix.tinygo-wasi-target }} -tags="fastlyinternaldebug nofastlyhostcalls" ./...
- name: Integration Tests - Go
env:
RUST_LOG: viceroy=info,viceroy-lib=info
GOARCH: wasm
GOOS: wasip1
run: go test -tags="fastlyinternaldebug" -exec "viceroy run -C fastly.toml" ./integration_tests/...
- name: Integration Tests - TinyGo
env:
RUST_LOG: viceroy=info,viceroy-lib=info
run: tinygo test -tags="fastlyinternaldebug" -target=targets/fastly-compute-${{ matrix.tinygo-wasi-target }}.json ./integration_tests/...