From c0f09c67d28bee344f0e80829769de5919d5212e Mon Sep 17 00:00:00 2001 From: Brandon <32753167+btoms20@users.noreply.github.com> Date: Thu, 8 Feb 2024 19:18:12 -0800 Subject: [PATCH] Create providers.yml --- .github/workflows/providers.yml | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/providers.yml diff --git a/.github/workflows/providers.yml b/.github/workflows/providers.yml new file mode 100644 index 0000000..ece558a --- /dev/null +++ b/.github/workflows/providers.yml @@ -0,0 +1,40 @@ +name: Test Dependency Graph + +on: + pull_request: + types: [labeled] + +jobs: + test-dependants: + if: contains(github.event.pull_request.labels.*.name, 'approved') + strategy: + fail-fast: false + matrix: + provider: + - swift-libp2p/swift-multihash + - swift-libp2p/swift-cid + - swift-libp2p/swift-multiaddr + os: [ubuntu-latest, macos-latest] + swift-version: ['5.9'] + runs-on: ${{ matrix.os }} + steps: + - name: Setup swift + uses: swift-actions/setup-swift@v1 + with: + swift-version: '${{ matrix.swift-version }}' + - name: Check out ${{ github.event.repository.name }} + uses: actions/checkout@v4 + with: + path: ${{ github.event.repository.name }} + - name: Check out provider + uses: actions/checkout@v4 + with: + repository: ${{ matrix.provider }} + path: provider + ref: ${{ matrix.ref }} + - name: Use local ${{ github.event.repository.name }} + run: swift package --package-path ./provider edit ${{ github.event.repository.name }} --path ./${{ github.event.repository.name }} + - name: Run tests + env: + SWIFT_DETERMINISTIC_HASHING: 1 + run: swift test --package-path ./provider