Skip to content

Commit

Permalink
add integ testing for event processor and added pr-level, nightly-bui…
Browse files Browse the repository at this point in the history
…ld, and release workflow (#488)
  • Loading branch information
yuunlimm authored Aug 23, 2024
1 parent 66fa26c commit 980580c
Show file tree
Hide file tree
Showing 12 changed files with 1,904 additions and 759 deletions.
28 changes: 28 additions & 0 deletions .github/actions/dep_install_and_lint/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Install Dependencies and Run Linter"
description: "Installs dependencies and runs the Rust linter."

inputs:
working-directory:
description: 'The working directory for the linter'
required: true
default: '.'

runs:
using: "composite"
steps:
- name: Install Dependencies
run: |
sudo apt update && sudo apt install libdw-dev
cargo install cargo-sort
rustup update
rustup toolchain install nightly
rustup component add clippy --toolchain nightly
rustup component add rustfmt --toolchain nightly
shell: bash
working-directory: ${{ inputs.working-directory }}

- name: Run Linter
run: |
scripts/rust_lint.sh --check
shell: bash
working-directory: ${{ inputs.working-directory }}
4 changes: 4 additions & 0 deletions .github/workflows/copy-processor-images-to-dockerhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ jobs:
- run: pnpm install --frozen-lockfile
working-directory: scripts

- name: Run Integration Tests for Specific Crate
run: cargo test --manifest-path integration-tests/Cargo.toml
working-directory: rust

- name: Release Images
env:
FORCE_COLOR: 3 # Force color output as per https://github.com/google/zx#using-github-actions
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run Integration Tests

on:
workflow_dispatch:
push:
branches:
- main
pull_request:

jobs:
Integration-tests:
runs-on: ubuntu-latest

steps:
- name: Set branch
run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: Checkout code
uses: actions/checkout@v3

- name: Install Dependencies and Run Linter
uses: ./.github/actions/dep_install_and_lint
with:
working-directory: rust

- name: Run Integration Tests
run: cargo test --manifest-path integration-tests/Cargo.toml
working-directory: rust
24 changes: 24 additions & 0 deletions .github/workflows/nightly-integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Nightly Run Integration Tests"

on:
workflow_dispatch:
schedule:
- cron: '0 9 * * *' # This runs the workflow every day at 9:00 AM UTC

jobs:

nightly-run:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Dependencies and Run Linter
uses: ./.github/actions/dep_install_and_lint
with:
working-directory: rust

- name: Run Integration Tests
run: cargo test --manifest-path integration-tests/Cargo.toml
working-directory: rust
Loading

0 comments on commit 980580c

Please sign in to comment.