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

[CI] Fix workflow inputs #47

Merged
merged 4 commits into from
Jul 4, 2023
Merged
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
16 changes: 7 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ on:
pull_request:
workflow_dispatch:
inputs:
crystal_version:
crystal:
type: string
default: nightly
shards:
type: string
default: nightly

Expand All @@ -19,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022, macos-13]
os: [ubuntu-22.04, windows-2022, macos-12]
defaults:
run:
shell: bash
Expand All @@ -28,19 +31,14 @@ jobs:

- uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ github.event.inputs.crystal_branch || 'latest' }}
crystal: ${{ github.event.inputs.crystal || 'nightly' }}
shards: ${{ github.event.inputs.shards || 'nightly' }}

- name: Setup BATS
uses: mig4/setup-bats@v1
with:
bats-version: 1.9.0

- name: Install dependencies
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install pkg-config
fi

- name: Test
run: |
bats --pretty --timing test
Expand Down
2 changes: 2 additions & 0 deletions test/libraries.bats
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function setup() {
if [[ "$(crystal env CRYSTAL_VERSION)" =~ ^0\.|^1\.[0-8]\. ]]; then
skiponwindows "Compiler bug in Crystal < 1.9"
fi
skiponwindows "Specs are failing"
Copy link
Member

Choose a reason for hiding this comment

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

What's the point of having the three lines above, if it's going to be skipped anyway?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's different reasons for skipping. This documents that it's not expected to build with Crystal 1.8 and below. But after that it's (probably) up to the shard wether it works or not.


shard_checkout https://github.com/kemalcr/kemal

Expand Down Expand Up @@ -174,6 +175,7 @@ function setup() {
if [[ "$(crystal env CRYSTAL_VERSION)" =~ ^0\.|^1\.[0-8]\. ]]; then
skiponwindows "Compiler bug in Crystal < 1.9"
fi
skiponwindows "Specs are failing"
straight-shoota marked this conversation as resolved.
Show resolved Hide resolved

shard_checkout https://github.com/jeromegn/slang

Expand Down
6 changes: 6 additions & 0 deletions test/tools.bats
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@ function setup() {
skiponwindows "Timeout"
shard_checkout https://github.com/crystal-ameba/ameba

if [[ "$(crystal env CRYSTAL_VERSION)" =~ ^1.9. ]]; then
if git show-ref --quiet refs/remotes/origin/update-to-work-with-crystal-nightly; then
git diff ...refs/remotes/origin/update-to-work-with-crystal-nightly | git apply
fi
fi

crystal_spec
}