diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65f3397..c5cb8c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,17 +10,9 @@ jobs: generate-matrix: name: "Generate matrix from cabal" runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - name: Checkout base repo - uses: actions/checkout@v4 - - name: Extract the tested GHC versions - id: set-matrix - run: | - wget https://github.com/Kleidukos/get-tested/releases/download/v0.1.5.0/get-tested-0.1.5.0-linux-amd64 -O get-tested - chmod +x get-tested - ./get-tested --ubuntu --macos get-tested.cabal >> $GITHUB_OUTPUT + - name: Generate matrix + uses: turion/get-tested tests: name: ${{ matrix.ghc }} on ${{ matrix.os }} needs: generate-matrix diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..4b68037 --- /dev/null +++ b/action.yml @@ -0,0 +1,25 @@ +name: "Generate matrix from cabal" + +inputs: + cabal-file: + description: "The path to your cabal file, e.g. somefolder/myproject.cabal" + required: true + +outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + +runs: + using: "composite" + steps: + - name: Checkout base repo + uses: actions/checkout@v2 + - name: Extract the tested GHC versions + id: set-matrix + run: | + wget https://github.com/Kleidukos/get-tested/releases/download/v0.1.5.0/get-tested-0.1.5.0-linux-amd64 -O get-tested + chmod +x get-tested + ./get-tested --ubuntu --macos ${{ inputs.cabal-file }} >> $GITHUB_OUTPUT + +branding: + icon: 'list' + color: 'blue'