2021-10-06 19:36:22 +00:00
|
|
|
name: Erlang
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
types: [opened, reopened, synchronize, labeled]
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test-matrix:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Read file
|
|
|
|
id: set-matrix
|
|
|
|
run: |
|
2021-12-28 21:14:26 +00:00
|
|
|
matrixStringifiedObject="{\"otp_version\":[\"24.2\",\"23.3.4.10\",\"22.3.4.24\"],\"rebar3_version\":[\"3.16.1\"],\"os\":[\"ubuntu-18.04\"]}"
|
2021-10-06 19:36:22 +00:00
|
|
|
echo "::set-output name=matrix::$matrixStringifiedObject"
|
|
|
|
opentelemetry-cowboy:
|
|
|
|
needs: [test-matrix]
|
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'erlang') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_cowboy'))
|
|
|
|
env:
|
|
|
|
app: 'opentelemetry_cowboy'
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
name: Opentelemetry Cowboy test on OTP ${{ matrix.otp_version }} with Rebar3 ${{ matrix.rebar3_version }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
2021-12-28 21:14:26 +00:00
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.rebar3_version }}-v3-${{ hashFiles('**/rebar.lock') }}
|
2021-10-06 19:36:22 +00:00
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: rebar3 get-deps
|
|
|
|
- name: Test
|
|
|
|
run: rebar3 ct
|
2021-11-28 01:33:47 +00:00
|
|
|
|
|
|
|
opentelemetry-telemetry:
|
|
|
|
needs: [test-matrix]
|
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'erlang') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_telemetry'))
|
|
|
|
env:
|
|
|
|
app: 'opentelemetry_telemetry'
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: utilities/${{ env.app }}
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
name: Opentelemetry Telemetry test on OTP ${{ matrix.otp_version }} with Rebar3 ${{ matrix.rebar3_version }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
2021-12-28 21:14:26 +00:00
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.rebar3_version }}-v3-${{ hashFiles('**/rebar.lock') }}
|
2021-11-28 01:33:47 +00:00
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: rebar3 get-deps
|
|
|
|
- name: Test
|
|
|
|
run: rebar3 ct
|
2022-07-21 17:40:47 +00:00
|
|
|
|
|
|
|
opentelemetry-aws-xray:
|
|
|
|
needs: [test-matrix]
|
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'erlang') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_aws_xray'))
|
|
|
|
env:
|
|
|
|
app: 'opentelemetry_aws_xray'
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: utilities/${{ env.app }}
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
name: Opentelemetry AWS X-Ray test on OTP ${{ matrix.otp_version }} with Rebar3 ${{ matrix.rebar3_version }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/_build
|
|
|
|
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.rebar3_version }}-v3-${{ hashFiles('**/rebar.lock') }}
|
|
|
|
- name: Fetch deps
|
|
|
|
if: steps.deps-cache.outputs.cache-hit != 'true'
|
|
|
|
run: rebar3 get-deps
|
|
|
|
- name: Test
|
|
|
|
run: rebar3 ct
|