2021-10-06 19:36:22 +00:00
|
|
|
name: Erlang
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2023-08-25 20:11:23 +00:00
|
|
|
- "main"
|
2021-10-06 19:36:22 +00:00
|
|
|
types: [opened, reopened, synchronize, labeled]
|
2022-11-15 23:22:28 +00:00
|
|
|
|
2021-10-06 19:36:22 +00:00
|
|
|
push:
|
|
|
|
branches:
|
2023-08-25 20:11:23 +00:00
|
|
|
- "main"
|
2021-10-06 19:36:22 +00:00
|
|
|
|
2022-11-15 23:22:28 +00:00
|
|
|
concurrency:
|
2022-11-25 21:35:36 +00:00
|
|
|
group: ci-${{ github.head_ref || github.run_id }}-erlang
|
2022-11-15 23:22:28 +00:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-10-06 19:36:22 +00:00
|
|
|
jobs:
|
|
|
|
test-matrix:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-10-06 19:36:22 +00:00
|
|
|
- name: Read file
|
|
|
|
id: set-matrix
|
|
|
|
run: |
|
2023-08-25 20:11:23 +00:00
|
|
|
matrixStringifiedObject="$(jq -c . .github/erlang-test-matrix.json)"
|
2022-11-15 23:22:28 +00:00
|
|
|
echo "matrix=$matrixStringifiedObject" >> $GITHUB_OUTPUT
|
2023-08-25 20:11:23 +00:00
|
|
|
|
2023-09-05 15:38:49 +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: ${{ matrix.os }}
|
|
|
|
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@v3
|
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
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
|
|
|
|
|
2021-10-06 19:36:22 +00:00
|
|
|
opentelemetry-cowboy:
|
|
|
|
needs: [test-matrix]
|
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'erlang') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_cowboy'))
|
|
|
|
env:
|
2023-08-25 20:11:23 +00:00
|
|
|
app: "opentelemetry_cowboy"
|
2021-10-06 19:36:22 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-10-06 19:36:22 +00:00
|
|
|
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:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-10-06 19:36:22 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
2021-10-06 19:36:22 +00:00
|
|
|
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
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-elli:
|
2021-11-28 01:33:47 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'erlang') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_elli'))
|
2021-11-28 01:33:47 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_elli"
|
2021-11-28 01:33:47 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
2023-09-05 15:38:49 +00:00
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry Elli test on OTP ${{ matrix.otp_version }} with Rebar3 ${{ matrix.rebar3_version }}
|
2021-11-28 01:33:47 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-11-28 01:33:47 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
2021-11-28 01:33:47 +00:00
|
|
|
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
|
|
|
|
2023-09-05 15:38:49 +00:00
|
|
|
opentelemetry-grpcbox:
|
2022-07-21 17:40:47 +00:00
|
|
|
needs: [test-matrix]
|
2023-09-05 15:38:49 +00:00
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'erlang') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_grpcbox'))
|
2022-07-21 17:40:47 +00:00
|
|
|
env:
|
2023-09-05 15:38:49 +00:00
|
|
|
app: "opentelemetry_grpcbox"
|
2022-07-21 17:40:47 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
2023-09-05 15:38:49 +00:00
|
|
|
working-directory: instrumentation/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-09-05 15:38:49 +00:00
|
|
|
name: Opentelemetry GRPCBox test on OTP ${{ matrix.otp_version }} with Rebar3 ${{ matrix.rebar3_version }}
|
2022-07-21 17:40:47 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix: ${{ fromJson(needs.test-matrix.outputs.matrix) }}
|
|
|
|
steps:
|
2022-11-15 23:22:28 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-21 17:40:47 +00:00
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
2022-11-15 23:22:28 +00:00
|
|
|
uses: actions/cache@v3
|
2022-07-21 17:40:47 +00:00
|
|
|
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
|
2023-07-16 20:04:13 +00:00
|
|
|
|
|
|
|
opentelemetry-instrumentation-http:
|
|
|
|
needs: [test-matrix]
|
|
|
|
if: (contains(github.event.pull_request.labels.*.name, 'erlang') && contains(github.event.pull_request.labels.*.name, 'opentelemetry_instrumentation_http'))
|
|
|
|
env:
|
|
|
|
app: "opentelemetry_instrumentation_http"
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: utilities/${{ env.app }}
|
2023-08-25 20:11:23 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2023-07-16 20:04:13 +00:00
|
|
|
name: OpenTelemetry Instrumentation HTTP 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@v3
|
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
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 eunit
|
2023-09-05 15:38:49 +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: ${{ matrix.os }}
|
|
|
|
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@v3
|
|
|
|
- uses: erlef/setup-beam@v1
|
|
|
|
with:
|
|
|
|
otp-version: ${{ matrix.otp_version }}
|
|
|
|
rebar3-version: ${{ matrix.rebar3_version }}
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
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
|