Skip to content

Commit

Permalink
refactor: e2e workflow(s) run (#223)
Browse files Browse the repository at this point in the history
* Run IPVM workflow (json) files, return beginning info
* Integrate Runner / worker bits, and pieces like
  * aborting workers
  * gc'ing handles
  * delayqueue/timing-wheel integration for expir(ed)/(ing) workflows
* worker's can now send messages to the runner, for things like
drop/abort
* make db pool accessible within worker, so it's reusable upon creation
and run
* store receipts and workflow/receipt joint info as part of a DB
transaction
* runtime-specific proc-macro and worker builder for easier test
integration
* this now spins up db-related tests (involving
workers/schedulers/the-runner) to use different sqlite dbs in parallel
* flake fixins around cargo nextest and macos
* Removes `Error` from Enum thiserror variants as per common usage
* workflow info "storage" stores a timestamp for local use
* remove bincode all around, and make rpc encoding/decoding work with
messagepack
* make database_url work as part as configuration or env (latter takes
precedent)
* more error-specific types
  • Loading branch information
Zeeshan Lakhani committed Aug 4, 2023
1 parent 4921bde commit 7d3f50f
Show file tree
Hide file tree
Showing 73 changed files with 3,543 additions and 1,683 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Cache Project
uses: Swatinem/rust-cache@v2

- name: Run Audit-Check
uses: rustsec/[email protected]
with:
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Setup IPFS
uses: ibnesayeed/setup-ipfs@master
with:
run_daemon: true

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

- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
id: toolchain
uses: dtolnay/rust-toolchain@nightly

- name: Override rust-toolchain.toml
run: rustup override set ${{steps.toolchain.outputs.name}}

- name: Cache Project
uses: Swatinem/rust-cache@v2

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

Expand Down
45 changes: 38 additions & 7 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ concurrency:

jobs:
run-checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust-toolchain:
- stable
- nightly
# minimum version
- 1.66
- 1.67
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -30,6 +31,12 @@ jobs:
# https://github.com/Swatinem/rust-cache
- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: check-${{ matrix.rust-toolchain }}-${{ matrix.os }}

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
id: toolchain
Expand All @@ -49,15 +56,15 @@ jobs:

# Check for security advisories
- name: Check Advisories
if: ${{ matrix.rust-toolchain == 'stable' }}
if: ${{ matrix.rust-toolchain == 'stable' && matrix.os == 'ubuntu-latest' }}
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check advisories
continue-on-error: true

# Audit licenses, unreleased crates, and unexpected duplicate versions.
- name: Check Bans, Licenses, and Sources
if: ${{ matrix.rust-toolchain == 'stable' }}
if: ${{ matrix.rust-toolchain == 'stable' && matrix.os == 'ubuntu-latest' }}
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check bans licenses sources
Expand All @@ -68,19 +75,31 @@ jobs:
run: cargo build --release

run-tests-all-features:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust-toolchain:
- stable
- nightly
runs-on: ${{ matrix.os }}
steps:
- name: Setup IPFS
uses: ibnesayeed/setup-ipfs@master
with:
run_daemon: true

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

- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: test-all-${{ matrix.rust-toolchain }}-${{ matrix.os }}

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
id: toolchain
Expand All @@ -101,19 +120,26 @@ jobs:
run: cargo test --doc

run-tests-no-default-features:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
rust-toolchain:
- stable
- nightly
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: test-0-${{ matrix.rust-toolchain }}-${{ matrix.os }}

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
id: toolchain
Expand All @@ -128,7 +154,7 @@ jobs:
uses: taiki-e/install-action@nextest

- name: Run Tests
run: cargo nextest run --profile ci --no-default-features
run: cargo nextest run --profile ci --no-default-features --features "test-utils"

run-docs:
runs-on: ubuntu-latest
Expand All @@ -141,6 +167,11 @@ jobs:

- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
shared-key: doc

- name: Use mold-linker
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@
private
*.temp
*.db
*.db-shm
*.db-wal
*.tmp
*.png
*.dot
.history
.DS_Store
homestar-guest-wasm/out
homestar-wasm/out
**/fixtures/test_*

# ipfs
.ipfs

# daemon
homestar.err
Expand Down
2 changes: 2 additions & 0 deletions .ignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ LICENSE
.gitignore
.release-please-manifest.json
.pre-commit-config.yaml

**/fixtures
Loading

0 comments on commit 7d3f50f

Please sign in to comment.