-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (51 loc) · 1.4 KB
/
run_unit_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
# Copyright (c) 2023 SolarWinds, LLC.
# All rights reserved.
name: Run Ruby Unit Test
on:
push:
branches-ignore:
- main
paths-ignore:
- 'test/Dockerfile'
workflow_dispatch:
jobs:
# run act to test locally: act -j unit_test --container-architecture linux/arm64 -s SW_APM_SERVICE_KEY=your_key
unit_test:
name: ${{ matrix.os }} - ruby ${{ matrix.ruby }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.2.2','3.1.0','3.0.6','2.7.5']
os: ['bullseye']
include:
- ruby: '3.2.2'
os: 'alpine3.17'
- ruby: '3.1.0'
os: 'alpine3.15'
- ruby: '3.0.6'
os: 'alpine3.16'
- ruby: '2.7.5'
os: 'alpine3.15'
container:
image: ruby:${{ matrix.ruby }}-${{ matrix.os }}
env:
SW_APM_SERVICE_KEY: ${{ secrets.DUMMY_SW_APM_SERVICE_KEY }}
RUBY_VERSION: ${{ matrix.ruby }}
steps:
- name: Checkout ${{ github.ref }}
uses: actions/checkout@v3
- name: print some info
run: |
user=`whoami`
pwd=`pwd`
echo "User: $user"
echo "Current dir: $pwd"
echo "Home dir: $HOME"
echo "Branch: ${GITHUB_REF#refs/*/}"
- name: ruby tests
run: |
export HOME=/root
export RUN_TESTS=1
echo "testing with ruby version: $RUBY_VERSION"
test/test_setup.sh