-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (51 loc) · 1.78 KB
/
test.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
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["1.0.0.preview1", "0.6.4-mrb", "1.2.2"]
default: [false]
include:
- version: "1.5.5"
default: true
steps:
- uses: actions/checkout@v4
- run: |
rm test/env/HEROKU_ANYCABLE_GO_VERSION
- name: Add GitHub token (to avoid rate limiting issues)
run: |
echo "${{ secrets.GITHUB_TOKEN }}" >> test/env/HEROKU_ANYCABLE_GO_GITHUB_TOKEN
- name: Set version
if: ${{ !matrix.default }}
run: |
echo "${{ matrix.version }}" >> test/env/HEROKU_ANYCABLE_GO_VERSION
- name: Prepare Docker image
run: docker build -t anycable-go-test .
- run: |
echo "DEBUG VERSION: $(docker run anycable-go-test)"
docker run anycable-go-test | grep -q "${{ matrix.version }}"
test_custom_repo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
rm test/env/HEROKU_ANYCABLE_GO_VERSION
- name: Add GitHub token (to avoid rate limiting issues)
run: |
echo "${{ secrets.GITHUB_TOKEN }}" >> test/env/HEROKU_ANYCABLE_GO_GITHUB_TOKEN
- name: Set custom source data
run: |
echo "https://github.com/anycable/websocket-bench" >> test/env/HEROKU_ANYCABLE_GO_REPO
echo "websocket-bench" >> test/env/HEROKU_ANYCABLE_GO_BINARY_NAME
echo "0.3.0" >> test/env/HEROKU_ANYCABLE_GO_VERSION
echo "false" >> test/env/HEROKU_ANYCABLE_GO_VERSION_SUFFIX
- name: Prepare Docker image
run: docker build -t anycable-go-test .
- run: |
docker run anycable-go-test /app/bin/websocket-bench -h | grep -q "0.3.0"