Skip to content

Merge pull request #10 from posit-dev/stream-processor-error #73

Merge pull request #10 from posit-dev/stream-processor-error

Merge pull request #10 from posit-dev/stream-processor-error #73

Workflow file for this run

name: BURST Tests
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
workflow_call:
permissions:
id-token: write # Required for OIDC authentication
contents: read
jobs:
build-and-unit-tests:
runs-on: ubuntu-latest
outputs:
slow-tests: ${{ steps.list-slow-tests.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libzstd-dev zlib1g-dev cmake ruby jq
- name: Install 7-Zip with Zstandard support
run: |
# Download official 7-Zip from 7-zip.org (includes Zstandard codec)
# Note: Ubuntu/Debian's p7zip-full package strips Zstandard for DFSG compliance
wget https://www.7-zip.org/a/7z2408-linux-x64.tar.xz
tar -xf 7z2408-linux-x64.tar.xz
sudo cp 7zz /usr/local/bin/
sudo chmod +x /usr/local/bin/7zz
7zz --help | head -2
- name: Build
run: |
mkdir build
cd build
cmake -DBUILD_DOWNLOADER=ON ..
make
- name: List slow tests for matrix
id: list-slow-tests
run: |
cd build
# Extract test names from ctest JSON output
TESTS=$(ctest -L slow --show-only=json-v1 | \
jq -c '[.tests[].name]')
echo "matrix=$TESTS" >> $GITHUB_OUTPUT
echo "Slow tests to run in parallel: $TESTS"
- name: Run unit tests
run: make test-unit
- name: Upload build for integration and E2E tests
uses: actions/upload-artifact@v4
with:
name: burst-binaries
path: |
build/burst-writer
build/burst-writer-*
build/burst-downloader
build/Makefile
build/CTestTestfile.cmake
build/tests/
retention-days: 1
integration-tests:
runs-on: ubuntu-latest
needs: build-and-unit-tests
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y btrfs-compsize unzip
sudo snap install aws-cli --classic
- name: Install 7-Zip with Zstandard support
run: |
# Download official 7-Zip from 7-zip.org (includes Zstandard codec)
# Note: Ubuntu/Debian's p7zip-full package strips Zstandard for DFSG compliance
wget https://www.7-zip.org/a/7z2408-linux-x64.tar.xz
tar -xf 7z2408-linux-x64.tar.xz
sudo cp 7zz /usr/local/bin/
sudo chmod +x /usr/local/bin/7zz
7zz --help | head -2
- name: Download binaries
uses: actions/download-artifact@v4
with:
name: burst-binaries
path: build/
- name: Make binaries executable
run: chmod +x build/burst-* build/tests/test_*
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::339404546440:role/BurstGithubTests
- name: Run integration tests (excluding slow E2E)
env:
BURST_TEST_BUCKET: burst-integration-tests
BURST_TEST_KEY_PREFIX: "ci-test-artifacts/"
AWS_REGION: us-east-1
run: make test-integration
slow-tests:
needs: build-and-unit-tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test: ${{ fromJson(needs.build-and-unit-tests.outputs.slow-tests) }}
steps:
- uses: actions/checkout@v2
- name: Install 7-Zip with Zstandard support
run: |
wget https://www.7-zip.org/a/7z2408-linux-x64.tar.xz
tar -xf 7z2408-linux-x64.tar.xz
sudo cp 7zz /usr/local/bin/
sudo chmod +x /usr/local/bin/7zz
- name: Download binaries
uses: actions/download-artifact@v4
with:
name: burst-binaries
path: build/
- name: Make binaries executable
run: chmod +x build/burst-* build/tests/test_*
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::339404546440:role/BurstGithubTests
- name: Run slow test - ${{ matrix.test }}
env:
BURST_TEST_BUCKET: burst-integration-tests
BURST_TEST_KEY_PREFIX: "ci-e2e-artifacts/"
AWS_REGION: us-east-1
run: cd build && ctest -R "^${{ matrix.test }}$" --output-on-failure