Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action #23

Merged
merged 12 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generate-matrix
Expand Down
25 changes: 25 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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
turion marked this conversation as resolved.
Show resolved Hide resolved
chmod +x get-tested
./get-tested --ubuntu --macos ${{ inputs.cabal-file }} >> $GITHUB_OUTPUT

branding:
icon: 'list'
color: 'blue'