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

refactor(IDX): add release testing jobs to main CI #304

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
70 changes: 70 additions & 0 deletions .github/workflows-source/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ anchors:
uses: actions/setup-python@v5
with:
python-version: '3.10'
check-rc-hotfix-branch: &check-rc-hotfix-branch
name: Check if RC or hotfix branch
id: branch_check
run: |
set -eExuo pipefail
if [[ $BRANCH_NAME =~ hotfix-.*-rc--.* ]] || [[ $BRANCH_NAME =~ rc--.* ]]; then
echo "is_rc_or_hotfix=true" >> $GITHUB_ENV
fi
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
bazel-test-all:
Expand Down Expand Up @@ -359,3 +369,63 @@ jobs:
set -eExuo pipefail
buildevents cmd "$ROOT_PIPELINE_ID" "$CI_JOB_ID" build-command -- \
cargo build --release

# release nightly workflows - should only be triggered on pushes to rc and hotfix branches
bazel-system-test-nightly:
name: Bazel System Test Nightly
<<: *dind-large-setup
if: ${{ github.event_name == 'push' }}
steps:
- <<: *checkout
- <<: *before-script
- <<: *check-rc-hotfix-branch
- name: Run Bazel System Test Nightly
id: bazel-test-all
if: steps.branch_check.outputs.is_rc_or_hotfix == 'true'
uses: ./.github/actions/bazel-test-all/
with:
BAZEL_COMMAND: "test"
BAZEL_TARGETS: "//rs/tests/..."
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_nightly --deleted_packages=gitlab-ci/src/gitlab_config"
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }}

bazel-system-test-staging:
name: Bazel System Test Staging
continue-on-error: True
<<: *dind-large-setup
if: ${{ github.event_name == 'push' }}
steps:
- <<: *checkout
- <<: *before-script
- <<: *check-rc-hotfix-branch
- name: Run Bazel System Test Staging
id: bazel-test-all
if: steps.branch_check.outputs.is_rc_or_hotfix == 'true'
uses: ./.github/actions/bazel-test-all/
with:
BAZEL_COMMAND: "test"
BAZEL_TARGETS: "//rs/tests/..."
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_staging --deleted_packages=gitlab-ci/src/gitlab_config"
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }}

bazel-system-test-hotfix:
name: Bazel System Test Hotfix
<<: *dind-large-setup
timeout-minutes: 90
if: ${{ github.event_name == 'push' }}
steps:
- <<: *checkout
- <<: *before-script
- <<: *check-rc-hotfix-branch
- name: Run Bazel Test All
id: bazel-test-all
if: steps.branch_check.outputs.is_rc_or_hotfix == 'true'
uses: ./.github/actions/bazel-test-all/
with:
BAZEL_COMMAND: "test"
BAZEL_TARGETS: "//rs/tests/..."
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
BAZEL_EXTRA_ARGS_RULES: "--test_tag_filters=system_test_hotfix --deleted_packages=gitlab-ci/src/gitlab_config"
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }}
96 changes: 0 additions & 96 deletions .github/workflows-source/release-testing.yml

This file was deleted.

110 changes: 110 additions & 0 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -397,3 +397,113 @@ jobs:
set -eExuo pipefail
buildevents cmd "$ROOT_PIPELINE_ID" "$CI_JOB_ID" build-command -- \
cargo build --release
# release nightly workflows - should only be triggered on pushes to rc and hotfix branches
bazel-system-test-nightly:
name: Bazel System Test Nightly
runs-on:
labels: dind-large
container:
image: ghcr.io/dfinity/ic-build@sha256:26cc347efa50935342742acddfb5d710fae1982d401911013ad8750f0603c590
timeout-minutes: 90
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 256 || 0 }}
- name: Before script
id: before-script
shell: bash
run: ./gitlab-ci/src/ci-scripts/before-script.sh
- name: Check if RC or hotfix branch
id: branch_check
run: |
set -eExuo pipefail
if [[ $BRANCH_NAME =~ hotfix-.*-rc--.* ]] || [[ $BRANCH_NAME =~ rc--.* ]]; then
echo "is_rc_or_hotfix=true" >> $GITHUB_ENV
fi
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
- name: Run Bazel System Test Nightly
id: bazel-test-all
if: steps.branch_check.outputs.is_rc_or_hotfix == 'true'
uses: ./.github/actions/bazel-test-all/
with:
BAZEL_COMMAND: "test"
BAZEL_TARGETS: "//rs/tests/..."
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_nightly --deleted_packages=gitlab-ci/src/gitlab_config"
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }}
bazel-system-test-staging:
name: Bazel System Test Staging
continue-on-error: True
runs-on:
labels: dind-large
container:
image: ghcr.io/dfinity/ic-build@sha256:26cc347efa50935342742acddfb5d710fae1982d401911013ad8750f0603c590
timeout-minutes: 90
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 256 || 0 }}
- name: Before script
id: before-script
shell: bash
run: ./gitlab-ci/src/ci-scripts/before-script.sh
- name: Check if RC or hotfix branch
id: branch_check
run: |
set -eExuo pipefail
if [[ $BRANCH_NAME =~ hotfix-.*-rc--.* ]] || [[ $BRANCH_NAME =~ rc--.* ]]; then
echo "is_rc_or_hotfix=true" >> $GITHUB_ENV
fi
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
- name: Run Bazel System Test Staging
id: bazel-test-all
if: steps.branch_check.outputs.is_rc_or_hotfix == 'true'
uses: ./.github/actions/bazel-test-all/
with:
BAZEL_COMMAND: "test"
BAZEL_TARGETS: "//rs/tests/..."
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_staging --deleted_packages=gitlab-ci/src/gitlab_config"
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }}
bazel-system-test-hotfix:
name: Bazel System Test Hotfix
runs-on:
labels: dind-large
container:
image: ghcr.io/dfinity/ic-build@sha256:26cc347efa50935342742acddfb5d710fae1982d401911013ad8750f0603c590
timeout-minutes: 90
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 256 || 0 }}
- name: Before script
id: before-script
shell: bash
run: ./gitlab-ci/src/ci-scripts/before-script.sh
- name: Check if RC or hotfix branch
id: branch_check
run: |
set -eExuo pipefail
if [[ $BRANCH_NAME =~ hotfix-.*-rc--.* ]] || [[ $BRANCH_NAME =~ rc--.* ]]; then
echo "is_rc_or_hotfix=true" >> $GITHUB_ENV
fi
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
- name: Run Bazel Test All
id: bazel-test-all
if: steps.branch_check.outputs.is_rc_or_hotfix == 'true'
uses: ./.github/actions/bazel-test-all/
with:
BAZEL_COMMAND: "test"
BAZEL_TARGETS: "//rs/tests/..."
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
BAZEL_EXTRA_ARGS_RULES: "--test_tag_filters=system_test_hotfix --deleted_packages=gitlab-ci/src/gitlab_config"
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }}
98 changes: 0 additions & 98 deletions .github/workflows/release-testing.yml

This file was deleted.