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

Provide default value for version #27

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
generate-matrix:
name: "Generate matrix from cabal"
outputs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -49,3 +49,15 @@ jobs:
run: cabal new-build
- name: Test
run: cabal new-test all
test-generate-matrix-default:
name: "Tests whether generating the matrix from cabal works with a default version"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
- name: Extract the tested GHC versions
id: set-matrix
uses: turion/get-tested@v0.1.6.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be changed back at the end.

with:
cabal-file: get-tested.cabal
ubuntu: true
5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ runs:
shell: bash
run: |
# Extract e.g. 0.1 from /runner/foo/bar/.../v0.1
wget -q https://github.com/Kleidukos/get-tested/releases/download/v${{ inputs.version }}/get-tested-${{ inputs.version }}-linux-amd64 -O get-tested
export DEFAULT_VERSION=$(basename $GITHUB_ACTION_PATH | tail -c +2)
export VERSION=${{ inputs.version }}
VERSION=${VERSION:-$DEFAULT_VERSION}
wget -q https://github.com/Kleidukos/get-tested/releases/download/v$VERSION/get-tested-$VERSION-linux-amd64 -O get-tested
chmod +x get-tested

echo "::debug:: Windows enabled: ${{ inputs.windows }}"
Expand Down
Loading