-
Notifications
You must be signed in to change notification settings - Fork 9
71 lines (71 loc) · 2.66 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
name: Integration Tests
on: [push]
env:
VICEROY_VERSION: 0.9.3
jobs:
integration-tests-tinygo:
strategy:
matrix:
include:
# Newest supported configuration
- go-version: '~1.21.0'
tinygo-version: '0.30.0'
# Oldest supported configuration
- go-version: '~1.19.0'
tinygo-version: '0.28.1'
runs-on: ubuntu-latest
steps:
- name: Checkout fastly/compute-sdk-go
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install TinyGo
uses: ./.github/actions/install-tinygo
with:
tinygo-version: ${{ matrix.tinygo-version }}
- name: Setup Fastly CLI
uses: fastly/compute-actions/setup@v5
- name: Install Viceroy ${{ env.VICEROY_VERSION }}
run: |
echo "Install Viceroy ${{ env.VICEROY_VERSION }}..."
wget 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
shell: "bash"
- name: Check our dependencies
run: |
go version
tinygo version
fastly version
viceroy --version
- name: Run Integration Tests
run: RUST_LOG="viceroy=info,viceroy-lib=info" tinygo test -v -target=fastly-compute.json ./integration_tests/...
integration-tests-go:
runs-on: ubuntu-latest
steps:
- name: Checkout fastly/compute-sdk-go
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: '~1.21.0'
- name: Setup Fastly CLI
uses: fastly/compute-actions/setup@v5
- name: Install Viceroy ${{ env.VICEROY_VERSION }}
run: |
echo "Install Viceroy ${{ env.VICEROY_VERSION }}..."
wget 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
shell: "bash"
- name: Check our dependencies
run: |
go version
fastly version
viceroy --version
- name: Run Integration Tests
run: RUST_LOG="viceroy=info,viceroy-lib=info" GOARCH=wasm GOOS=wasip1 go test -exec "viceroy run -C fastly.toml" -v ./integration_tests/...