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

enhancement(ci): reduce billable time of Test Suite #17714

Merged
merged 7 commits into from
Jun 22, 2023
Merged
Changes from 2 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
62 changes: 14 additions & 48 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -33,50 +33,6 @@ jobs:
base_ref: ${{ github.event.merge_group.base_ref || github.event.pull_request.base.ref }}
head_ref: ${{ github.event.merge_group.head_ref || github.event.pull_request.head.ref }}

# Remove this once https://github.com/vectordotdev/vector/issues/3771 is closed.
# Then, modify the `cross-linux` job to run `test` instead of `build`.
test-linux:
name: Unit - x86_64-unknown-linux-gnu
runs-on: [linux, ubuntu-20.04-8core]
needs: changes
env:
CARGO_INCREMENTAL: 0
if: ${{ needs.changes.outputs.source == 'true' }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
name: Cache Cargo registry + index
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: echo "::add-matcher::.github/matchers/rust.json"
- run: make test
env:
CARGO_BUILD_JOBS: 5
- name: Upload test results
run: scripts/upload-test-results.sh
if: always()

test-vrl:
name: VRL - Linux
continue-on-error: true
runs-on: [linux, ubuntu-20.04-8core]
needs: changes
if: ${{ needs.changes.outputs.source == 'true' || needs.changes.outputs.cue == 'true' }}
steps:
- uses: actions/checkout@v3
- run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: cargo vdev test-vrl

checks:
name: Checks
runs-on: [linux, ubuntu-20.04-8core]
neuronull marked this conversation as resolved.
Show resolved Hide resolved
@@ -108,6 +64,17 @@ jobs:
- name: Check clippy
if: needs.changes.outputs.source == 'true'
run: make check-clippy

# Remove this once https://github.com/vectordotdev/vector/issues/3771 is closed.
# Then, modify the `cross-linux` job to run `test` instead of `build`.
- name: Unit - x86_64-unknown-linux-gnu
run: make test
env:
CARGO_BUILD_JOBS: 5
- name: Upload test results
run: scripts/upload-test-results.sh
if: always()

- name: Check version
run: make check-version
- name: Check scripts
@@ -133,6 +100,8 @@ jobs:
- name: Check Rust Docs
if: needs.changes.outputs.source == 'true'
run: cd rust-doc && make docs
- if: needs.changes.outputs.source == 'true' || needs.changes.outputs.cue == 'true'
run: cargo vdev test-vrl
neuronull marked this conversation as resolved.
Show resolved Hide resolved
- uses: actions/upload-artifact@v3
with:
name: "config-schema.json"
@@ -144,10 +113,7 @@ jobs:
name: Test Suite
runs-on: ubuntu-20.04
if: always()
needs:
- checks
- test-vrl
- test-linux
needs: checks
env:
FAILED: ${{ contains(needs.*.result, 'failure') }}
steps: