name: Reproducible Runtime

on:
  push:
    branches:
      - develop
    paths:
      - "Cargo.lock"
      - "common/**"
      - "crypto/**"
      - "substrate/**"
      - "orchestration/runtime/**"
      - "tests/reproducible-runtime/**"

  pull_request:
    paths:
      - "Cargo.lock"
      - "common/**"
      - "crypto/**"
      - "substrate/**"
      - "orchestration/runtime/**"
      - "tests/reproducible-runtime/**"

  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac

      - name: Install Build Dependencies
        uses: ./.github/actions/build-dependencies
        with:
          github-token: ${{ inputs.github-token }}

      - name: Run Reproducible Runtime tests
        run: cd tests/reproducible-runtime && GITHUB_CI=true RUST_BACKTRACE=1 cargo test
