Skip to content

Commit

Permalink
ci: setup reusable workflow for integration tests (#158)
Browse files Browse the repository at this point in the history
<!--
* New contributors are highly encouraged to read our
  [CONTRIBUTING](/CONTRIBUTING.md) documentation.
* Commit and PR titles should be prefixed with the general area of the
pull request's change.

-->
### What does this PR do?

This PR creates a new workflow because we can't use the codecov workflow
in dd-trace-go. Even if we are not technically using it because the `if`
condition would have evaluated to false. cf. [this
job](https://github.com/DataDog/dd-trace-go/actions/runs/9892772923)

### Motivation

Add a CI connection dd-trace-go and orchestrion to make sure we don't
break orchestrion features when changing dd-trace-go

---------

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
  • Loading branch information
eliottness authored Aug 6, 2024
1 parent 1123ea0 commit 7a63af1
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/workflow_call.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Integration Tests (Workflow Call)
on:
workflow_dispatch:
inputs:
dd-trace-go-ref:
description: 'The ref to checkout dd-trace-go at'
required: false
type: string
default: main
workflow_call:
inputs:
dd-trace-go-ref:
type: string
required: true
description: 'The ref to checkout dd-trace-go at'

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ inputs.dd-trace-go-ref }}
cancel-in-progress: true

jobs:
integration-tests:
runs-on: ubuntu-latest-16-cores
name: Integration Smoke Tests
steps:
- name: Checkout orchestrion
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
path: orchestrion
repository: DataDog/orchestrion
- name: Checkout dd-trace-go
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
path: dd-trace-go
repository: DataDog/dd-trace-go
ref: ${{ inputs.dd-trace-go-ref }}
- name: Setup go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
with:
go-version: '1.21'
cache-dependency-path: "**/*.sum"
- name: Setup python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5
with:
python-version: '>=3.9 <3.13'
cache: pip
cache-dependency-path: orchestrion/_integration-tests/utils/agent/requirements.txt
- name: Install python dependencies
run: pip install -r orchestrion/_integration-tests/utils/agent/requirements.txt
- name: Build orchestrion binary
run: go -C orchestrion/ build -o="./_integration-tests/orchestrion.exe" .
- name: Run Integration Tests
shell: bash
run: |-
set -x
cd orchestrion/_integration-tests
./orchestrion.exe go mod edit -replace=gopkg.in/DataDog/dd-trace-go.v1=../../dd-trace-go
./orchestrion.exe go mod tidy
./orchestrion.exe go test -v -tags=integration,buildtag -shuffle=on ./...

0 comments on commit 7a63af1

Please sign in to comment.