Bump actions/setup-node from 2 to 4 #87
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2021 SolarWinds, LLC. | |
# All rights reserved. | |
name: Run Ruby Tests on 4 Linux | |
on: | |
pull_request: | |
types: | |
- closed | |
paths-ignore: | |
- 'test/run_tests/Dockerfile_*' | |
- 'lib/solarwinds_apm/version.rb' | |
- 'CHANGELOG.md' | |
workflow_dispatch: | |
jobs: | |
all_linux_test: | |
if: github.event.pull_request.merged == true | |
name: ${{ matrix.os }} - ruby ${{ matrix.ruby }} | |
runs-on: ubuntu-latest | |
# needs: build_images | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, debian, amzlinux, alpine] | |
ruby: ['3.1', '3.0', '2.7', '2.6', '2.5'] | |
container: | |
image: ghcr.io/${{ github.repository }}/apm_ruby_${{ matrix.os }} | |
env: | |
SW_APM_GEM_TEST: true | |
SW_APM_REPORTER: file | |
SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson | |
SW_APM_REPORTER_FILE_SINGLE: false | |
OBOE_STAGING: true | |
MONGO_SERVER: "mongo" | |
RABBITMQ_SERVER: "rabbitmq" | |
MEMCACHED_SERVER: "memcached" | |
MYSQL_ALLOW_EMPTY_PASSWORD: "yes" | |
MYSQL_ROOT_PASSWORD: "admin" | |
MYSQL_HOST: "mysql" | |
MYSQL_DATABASE: "test_db" | |
POSTGRES_DB: "test_db" | |
DOCKER_MYSQL_PASS: "admin" | |
DOCKER_PSQL_PASS: "postgres" | |
POSTGRES_USER: "postgres" | |
POSTGRES_PASSWORD: "postgres" | |
POSTGRES_HOST: "postgres" | |
QUERY_LOG_FILE: "/tmp/sw_apm_query_logs.txt" | |
REDIS_PASSWORD: "redis_pass" | |
TEST_RUNS_TO_FILE: "true" | |
services: | |
memcached: | |
image: memcached:latest | |
ports: | |
- 11211:11211 | |
options: --health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/udp/127.0.0.1/11211'" --health-interval 10s --health-timeout 5s --health-retries 5 | |
rabbitmq: | |
image: rabbitmq:latest | |
ports: | |
- 5672:5672 | |
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5 | |
mongo: | |
image: mongo:6 | |
ports: | |
- 27017:27017 | |
options: --health-cmd "mongosh --quiet --eval 'quit(db.runCommand({ping:1}).ok ? 0:2)'" --health-interval 10s --health-timeout 5s --health-retries 5 | |
postgres: | |
image: postgres:latest | |
env: | |
POSTGRES_PASSWORD: "postgres" | |
POSTGRES_DB: test_db | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
mysql: | |
image: mariadb:10.9.6 | |
env: | |
MYSQL_USER: user | |
MYSQL_PASSWORD: password | |
MYSQL_DATABASE: test_db | |
MYSQL_ROOT_PASSWORD: admin | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | |
steps: | |
- name: Checkout ${{ github.ref }} | |
uses: actions/checkout@v4 | |
- 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 | |
test/run_tests/ruby_setup.sh | |
version=`rbenv versions --bare | grep ${{ matrix.ruby }}` | |
rbenv global $version | |
echo "testing with ruby version: $version" | |
test/run_tests/run_tests.sh -r $version |