Skip to content

ci: add integration tests #1

ci: add integration tests

ci: add integration tests #1

Workflow file for this run

name: Build
on: [pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable # Stable is first to test with Cargo.lock
- "1.85" # Current MSRV due to Cargo MSRV feature
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/rust-build
with:
toolchain: ${{ matrix.toolchain }}
- name: Upload artifact for testing
uses: actions/upload-artifact@v4
with:
name: example-simple
path: ./target/debug/example/simple
build-decoder:
name: Build Decoder
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
cache-directories: decoder
- name: Build
working-directory: decoder
shell: bash
run: cargo build --all-features --verbose
- name: Run tests
working-directory: decoder
shell: bash
run: cargo test --all-features --verbose
- name: Upload artifact for testing
uses: actions/upload-artifact@v4
with:
name: pollcatch-decoder
path: ./decoder/target/debug/pollcatch-decoder
test:
name: Integration test
runs-on: ubuntu-latest
needs: build
needs: build-decoder

Check failure on line 57 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 57
steps:
- uses: actions/checkout@v4
- name: Install async-profiler Dependencies
run: sudo apt-get install -y sudo libicu-dev patchelf curl make g++ openjdk-11-jdk-headless gcovr
- name: Download pollcatch-decoder
uses: actions/download-artifact@v4
with:
name: pollcatch-decoder
path: ./tests/pollcatch-decoder
- name: Download example-simple
uses: actions/download-artifact@v4
with:
name: example-simple
path: ./tests/example-simple
- name: Run integration test
shell: bash
working-directory: tests
run: ./integration.sh