Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge specialized PR workflows back into one configuration file #2363

Merged
merged 27 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c4eaf84
Attempt to simply docs only CI runs
Mpdreamz May 23, 2024
f056dc3
fix embedded yaml hopefully
Mpdreamz May 23, 2024
743858b
fix embedded yaml strings
Mpdreamz May 23, 2024
45f207c
fix variable subs
Mpdreamz May 23, 2024
b4dcfe4
fix output check
Mpdreamz May 23, 2024
6b3a162
use output
Mpdreamz May 23, 2024
6702a83
no negate
Mpdreamz May 23, 2024
5e0d91c
jobs => needs
Mpdreamz May 23, 2024
dc3ec7e
see if negate works
Mpdreamz May 23, 2024
7c17887
remove -docs for test-linux
Mpdreamz May 23, 2024
21c2f00
format should need changeset
Mpdreamz May 23, 2024
229f76a
make heavy integration tests dependend on unit tests
Mpdreamz May 23, 2024
ae73a08
undo negate again
Mpdreamz May 23, 2024
0c9c0d0
Move windows over to new checks
Mpdreamz May 23, 2024
f4089d1
pass secret explicitly since composite cannot inherit
Mpdreamz May 23, 2024
c78b35d
remove echo
Mpdreamz May 23, 2024
394abe6
format needs to run on windows
Mpdreamz May 23, 2024
f923620
re-enable IIS and make it docs aware as well
Mpdreamz May 23, 2024
e63b4ef
remove echo
Mpdreamz May 23, 2024
f3b101f
Apply suggestions from code review
Mpdreamz May 24, 2024
e1b1a36
Merge remote-tracking branch 'origin/main' into fix/simplify-docs-noo…
Mpdreamz May 28, 2024
cdb2e27
separate unit and integrations, since integrations currently has a ro…
Mpdreamz May 28, 2024
4ea74f5
revert back to -docs.yml to follow established company wide patterns
Mpdreamz Jun 4, 2024
f61d3a4
remove changeset composite action
Mpdreamz Jun 4, 2024
8e3531b
merge -iis and -windows
Mpdreamz Jun 4, 2024
ea2e7b9
fix yml indentation
Mpdreamz Jun 4, 2024
9972082
Update .github/workflows/test-windows.yml
Mpdreamz Jun 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@ inputs:
description: 'Install azure functions tool chain ("true" or "false")'
required: false
default: "false"
tc-cloud:
description: 'Bootstrap TestContainers Cloud (TOKEN or "false")'
required: false
default: "false"
outputs:
agent-version:
description: "The current agent version number"
value: ${{ steps.dotnet.outputs.agent-version }}
major-version:
description: "The current major version number, semver"
value: ${{ steps.dotnet.outputs.major-version }}


runs:
using: "composite"
Expand All @@ -27,7 +32,7 @@ runs:
run: |
git fetch --prune --unshallow --tags
git tag --list

- uses: actions/cache@v4
with:
path: ~/.nuget/packages
Expand Down Expand Up @@ -56,10 +61,11 @@ runs:

# Setup git config
- uses: elastic/apm-pipeline-library/.github/actions/setup-git@current

# install common dependencies
- name: Install common dependencies
uses: ./.github/workflows/install-dependencies
with:
rust: '${{ inputs.rust }}'
azure: '${{ inputs.azure }}'
tc-cloud: '${{ inputs.tc-cloud }}'
27 changes: 24 additions & 3 deletions .github/workflows/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ inputs:
required: false
default: "false"
azure:
description: 'Install azure functions tool chain ("true" or "false")'
required: false
default: "false"
description: 'Install azure functions tool chain ("true" or "false")'
required: false
default: "false"
tc-cloud:
description: 'Bootstrap TestContainers Cloud (TOKEN or "false")'
required: false
default: "false"

runs:
using: "composite"
Expand Down Expand Up @@ -55,3 +59,20 @@ runs:
shell: cmd
run: choco install azure-functions-core-tools -y --no-progress -r --version 4.0.4829

# TEST CONTAINERS CLOUD
# If no PR event or if a PR event that's caused by a non-fork and non dependabot actor
- name: Setup TestContainers Cloud Client
if: |
inputs.tc-cloud != 'false'
&& (github.event_name != 'pull_request'
|| (github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.fork == false
&& github.actor != 'dependabot[bot]'
)
)
uses: atomicjar/testcontainers-cloud-setup-action@c335bdbb570ec7c48f72c7d450c077f0a002293e # v1.3.0
with:
token: ${{ inputs.tc-cloud }}



57 changes: 41 additions & 16 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,45 @@ permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

defaults:
run:
shell: bash

env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages


# 'pack' & 'tests' are required checks in this workflow.

# To not burn unneeded CI cycles:
# - Our required checks will always succeed if doc only changes are detected.
# - all jobs depend on 'format' to not waste cycles on quickly fixable errors.

jobs:

format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
uses: ./.github/workflows/bootstrap
- name: Format
run: ./build.sh format

#required step
pack:
runs-on: ubuntu-latest

needs: [ 'format' ]
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
uses: ./.github/workflows/bootstrap
with:
rust: 'true'

- name: Format
run: ./build.sh format

- name: Package
run: ./build.sh pack

Expand All @@ -48,25 +67,23 @@ jobs:
path: build/output/*
retention-days: 1

#required step
tests:
runs-on: ubuntu-latest
needs: [ 'format' ]
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
uses: ./.github/workflows/bootstrap

- name: 'Tests: Unit'
shell: bash
run: ./build.sh test --test-suite unit

- name: 'Tests: Integrations'
shell: bash
run: ./build.sh test --test-suite integrations

azure-tests:
runs-on: ubuntu-latest
needs: [ 'format', 'tests' ]
if: ${{ false }}
#if: |
# github.event_name != 'pull_request'
Expand Down Expand Up @@ -98,7 +115,6 @@ jobs:
echo "AZURE_RESOURCE_GROUP_PREFIX=ci-dotnet-${GITHUB_RUN_ID}" >> ${GITHUB_ENV}

- name: 'Tests: Azure'
shell: bash
run: ./build.sh test --test-suite azure

- name: 'Teardown tests infra'
Expand All @@ -107,22 +123,32 @@ jobs:
for group in $(az group list --query "[?name | starts_with(@,'${{ env.AZURE_RESOURCE_GROUP_PREFIX }}')]" --out json | jq .[].name --raw-output); do
az group delete --name "${group}" --no-wait --yes
done

integration-tests:
runs-on: ubuntu-latest
needs: [ 'format', 'tests' ]
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
uses: ./.github/workflows/bootstrap

- name: 'Tests: Integrations'
run: ./build.sh test --test-suite integrations

startup-hook-tests:
runs-on: ubuntu-latest

needs: [ 'format', 'tests' ]
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
uses: ./.github/workflows/bootstrap

- name: 'Tests: StartupHooks'
shell: bash
run: ./build.sh test --test-suite startuphooks

profiler-tests:
runs-on: ubuntu-latest

needs: [ 'format', 'tests' ]
steps:
- uses: actions/checkout@v4
- name: Bootstrap Action Workspace
Expand All @@ -132,7 +158,6 @@ jobs:
rust: 'true'

- name: 'Tests: Profiler'
shell: bash
run: ./build.sh test --test-suite profiler

- name: Build Profiler Docker Image
Expand Down
110 changes: 0 additions & 110 deletions .github/workflows/test-windows-iis.yml

This file was deleted.

Loading
Loading