From 46ae608042ba9a439a0ef56345d6488ecd004451 Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 7 Dec 2022 23:33:34 +0100 Subject: [PATCH 1/7] ci: introduce continuous smoke testing --- .github/workflows/smoke-tests.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/smoke-tests.yml diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml new file mode 100644 index 0000000000..892960c3e4 --- /dev/null +++ b/.github/workflows/smoke-tests.yml @@ -0,0 +1,35 @@ +name: Smoke Tests + +on: + push: + branches: + - main + - release-* + tags: + - '**' + schedule: # nightly + - cron: "0 0 * * *" + workflow_dispatch: {} #manually + + jobs: + go-get-u: + name: 'dd-trace-go still works after go get -u' + description: < + Run go get -u to upgrade dd-trace-go dependencies to their + latest minor version and see if dd-trace-go still compiles. + Ensure issue https://github.com/DataDog/dd-trace-go/issues/1607 + runs-on: ubuntu-latest + environment: + PACKAGES: ./internal/... ./ddtrace/... ./profiler/... ./appsec/... + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + cache: true + - name: go get -u + run: go get -u $PACKAGES + - name: Compile dd-trace-go + run: go build -tags appsec $PACKAGES + - name: Test dd-trace-go + run: go test -tags appsec $PACKAGES \ No newline at end of file From 64a8e5b6d0d7365686c6f9e3ce4fe3ea0bf0ca8d Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 7 Dec 2022 23:41:04 +0100 Subject: [PATCH 2/7] yaml is hard --- .github/workflows/smoke-tests.yml | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 892960c3e4..924289d3ed 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -11,25 +11,25 @@ on: - cron: "0 0 * * *" workflow_dispatch: {} #manually - jobs: - go-get-u: - name: 'dd-trace-go still works after go get -u' - description: < - Run go get -u to upgrade dd-trace-go dependencies to their - latest minor version and see if dd-trace-go still compiles. - Ensure issue https://github.com/DataDog/dd-trace-go/issues/1607 - runs-on: ubuntu-latest - environment: - PACKAGES: ./internal/... ./ddtrace/... ./profiler/... ./appsec/... - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v3 - with: - go-version: 1.18 - cache: true - - name: go get -u - run: go get -u $PACKAGES - - name: Compile dd-trace-go - run: go build -tags appsec $PACKAGES - - name: Test dd-trace-go - run: go test -tags appsec $PACKAGES \ No newline at end of file +jobs: + go-get-u: + name: 'dd-trace-go still works after go get -u' + description: < + Run go get -u to upgrade dd-trace-go dependencies to their + latest minor version and see if dd-trace-go still compiles. + Ensure issue https://github.com/DataDog/dd-trace-go/issues/1607 + runs-on: ubuntu-latest + environment: + PACKAGES: ./internal/... ./ddtrace/... ./profiler/... ./appsec/... + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v3 + with: + go-version: 1.18 + cache: true + - name: go get -u + run: go get -u $PACKAGES + - name: Compile dd-trace-go + run: go build -tags appsec $PACKAGES + - name: Test dd-trace-go + run: go test -tags appsec $PACKAGES From 296b9dd616b5f3b00e3812ffe9431c7273929c5e Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 7 Dec 2022 23:42:06 +0100 Subject: [PATCH 3/7] yaml is very hard --- .github/workflows/smoke-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 924289d3ed..91a4024cbd 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -19,7 +19,7 @@ jobs: latest minor version and see if dd-trace-go still compiles. Ensure issue https://github.com/DataDog/dd-trace-go/issues/1607 runs-on: ubuntu-latest - environment: + env: PACKAGES: ./internal/... ./ddtrace/... ./profiler/... ./appsec/... steps: - uses: actions/checkout@v2 From 438ca64ab7b4300d4d87a377bd9188762ee17b5f Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 7 Dec 2022 23:43:49 +0100 Subject: [PATCH 4/7] temporarily enable the workflow on PRs --- .github/workflows/smoke-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 91a4024cbd..0f6ea997ca 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -9,6 +9,7 @@ on: - '**' schedule: # nightly - cron: "0 0 * * *" + pull_request: workflow_dispatch: {} #manually jobs: From bdb266e43ef9bc40f156137117b878cc4e2838da Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 7 Dec 2022 23:49:44 +0100 Subject: [PATCH 5/7] temporarily enable the workflow on PRs --- .github/workflows/smoke-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 0f6ea997ca..5c01484083 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -10,6 +10,8 @@ on: schedule: # nightly - cron: "0 0 * * *" pull_request: + branches: + - "**" workflow_dispatch: {} #manually jobs: From da186f4fc3e42c82a431cf980516af2fe08f01fd Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 7 Dec 2022 23:51:40 +0100 Subject: [PATCH 6/7] yaml is very very hard --- .github/workflows/smoke-tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 5c01484083..e3d79638ff 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -16,11 +16,10 @@ on: jobs: go-get-u: + # Run go get -u to upgrade dd-trace-go dependencies to their + # latest minor version and see if dd-trace-go still compiles. + # Related to issue https://github.com/DataDog/dd-trace-go/issues/1607 name: 'dd-trace-go still works after go get -u' - description: < - Run go get -u to upgrade dd-trace-go dependencies to their - latest minor version and see if dd-trace-go still compiles. - Ensure issue https://github.com/DataDog/dd-trace-go/issues/1607 runs-on: ubuntu-latest env: PACKAGES: ./internal/... ./ddtrace/... ./profiler/... ./appsec/... From ab1dca818b02a3a14f45396657db63685446ff73 Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Wed, 7 Dec 2022 23:54:54 +0100 Subject: [PATCH 7/7] do not run on pull requests --- .github/workflows/smoke-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index e3d79638ff..32fab179a4 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -9,9 +9,6 @@ on: - '**' schedule: # nightly - cron: "0 0 * * *" - pull_request: - branches: - - "**" workflow_dispatch: {} #manually jobs: