diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5bd682e --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Test strategy +on: [push] + +jobs: + something: + runs-on: ubuntu-latest + outputs: + result: ${{ steps.set-result.outputs.test }} + steps: + - uses: actions/github-script@v7 + id: set-result + with: + script: | + const output = {}; + core.setOutput("test", JSON.stringify(output)) + return; + - name: Get result + run: echo "${{steps.set-result.outputs.test}}" + test: + if: ${{ needs.something.outputs.result != '[]' }} + runs-on: ubuntu-latest + needs: ["something"] + strategy: + matrix: ${{ fromJson(needs.something.outputs.result) }} + steps: + - run: echo "Mock test logs ${{ strategy.job-index }}" + - run: echo "Mock test logs ${{ matrix.testgroup }} ${{ matrix.node }} ${{ matrix.something }}"