Skip to content
Draft
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
183 changes: 0 additions & 183 deletions .github/workflows/.aspect-workflows-reusable.yaml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/aspect-workflows-delivery.yaml

This file was deleted.

16 changes: 7 additions & 9 deletions .github/workflows/aspect-workflows-warming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,18 @@ jobs:
warming-archive:
name: Aspect Workflows Warming
runs-on: [self-hosted, aspect-workflows, aspect-warming]
env:
ASPECT_WORKFLOWS_BIN_DIR: /etc/aspect/workflows/bin
steps:
- name: Workflows environment
run: ${ASPECT_WORKFLOWS_BIN_DIR}/configure_workflows_env
- uses: actions/checkout@v4
run: /etc/aspect/workflows/bin/configure_workflows_env
- name: Clone repo
uses: actions/checkout@v4
- name: Agent health check
# Set RUNNER_TRACKER_ID="" to prevent GitHub Actions from killing the Bazel server started
# during health check when "Cleaning up orphan processes" in the "Complete job" step.
# See https://github.com/actions/runner/issues/598.
run: RUNNER_TRACKER_ID="" && ${ASPECT_WORKFLOWS_BIN_DIR}/agent_health_check
run: RUNNER_TRACKER_ID="" && /etc/aspect/workflows/bin/agent_health_check
- name: Create warming archive
uses: aspect-build/[email protected]
with:
task: warming
run: rosetta run --workspace . warming
shell: bash
- name: Archive warming tars
run: ${ASPECT_WORKFLOWS_BIN_DIR}/warming_archive
run: /etc/aspect/workflows/bin/warming_archive
45 changes: 40 additions & 5 deletions .github/workflows/aspect-workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,43 @@ concurrency:
cancel-in-progress: ${{ github.ref_name != 'main' }}

jobs:
aspect-workflows:
name: Aspect Workflows
uses: ./.github/workflows/.aspect-workflows-reusable.yaml
with:
queue: aspect-small
test:
name: Test
runs-on: [self-hosted, aspect-workflows, aspect-default]
steps:
- name: Workflows environment
run: /etc/aspect/workflows/bin/configure_workflows_env
- name: Clone repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Agent health check
# Set RUNNER_TRACKER_ID="" to prevent GitHub Actions from killing the Bazel server started during health check when "Cleaning up orphan processes" in the "Complete job" step. See https://github.com/actions/runner/issues/598.
run: RUNNER_TRACKER_ID="" && /etc/aspect/workflows/bin/agent_health_check
- name: Test
run: |
# Clear artifact directories
rm -rf /workflows/artifacts /workflows/testlogs
# Set Aspect Workflows common bazel flags in /etc/bazel.bazelrc
rosetta bazelrc > /etc/bazel.bazelrc
# Run a query
bazel query 'kind("go_test rule", //...)' > targets.out
cat targets.out
# Generate a dynamic Aspect Workflows config file from the query results
/etc/aspect/workflows/bin/jq -R -s 'split("\n") | map(select(. != "")) | {tasks: [{test: {targets: .}}]}' targets.out > .aspect/workflows/dynamic_config.yaml
cat .aspect/workflows/dynamic_config.yaml
# Run the test task from the dynamically generated config file
rosetta run --config .aspect/workflows/dynamic_config.yaml test
# Alternately you could escape from Aspect Workflows tasks and call bazel test directly
bazel test $(cat targets.out)
shell: bash
- name: Upload artifacts
# The `always()` condition makes this step run even if a previous step failed. Setting `continue-on-error: true` on previous steps isn't ideal as the UI will flag them as having passed even if they failed.
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: test.artifact
path: |
/workflows/artifacts/**
/workflows/testlogs/**
overwrite: true