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 test for athena-framework #56

Merged
merged 6 commits into from
Oct 11, 2024
Merged

Add test for athena-framework #56

merged 6 commits into from
Oct 11, 2024

Conversation

straight-shoota
Copy link
Member

No description provided.

@straight-shoota straight-shoota added the enhancement New feature or request label Apr 10, 2024
@straight-shoota straight-shoota self-assigned this Apr 10, 2024
@Blacksmoke16
Copy link
Member

FWIW prob be fine to just close this. I have nightly CI setup for formatter and each supported OS. So no need to also maintain this to do the same thing.

@straight-shoota
Copy link
Member Author

The point of this repository is to gauge the effect of changes on important code bases in the ecosystem. It allows us to run tests with specific development builds of the compiler and stdlib.
This goes in parallel to test setups of the individual projects which cannot easily be triggered like this.

test/athena.bats Outdated Show resolved Hide resolved
Co-authored-by: George Dietrich <[email protected]>
Co-authored-by: George Dietrich <[email protected]>
@straight-shoota
Copy link
Member Author

straight-shoota commented Oct 10, 2024

The shards install failure is weird: https://github.com/crystal-lang/test-ecosystem/actions/runs/11276440947/job/31360217345?pr=56

   I: Resolving dependencies
   I: Fetching https://github.com/athena-framework/framework.git
   I: Fetching https://github.com/athena-framework/clock.git
   I: Fetching https://github.com/athena-framework/console.git
   I: Fetching https://github.com/athena-framework/dependency-injection.git
   I: Fetching https://github.com/athena-framework/dotenv.git
   I: Fetching https://github.com/athena-framework/event-dispatcher.git
   I: Fetching https://github.com/athena-framework/image-size.git
   I: Fetching https://github.com/athena-framework/mercure.git
   I: Fetching https://github.com/athena-framework/negotiation.git
   I: Fetching https://github.com/athena-framework/routing.git
   I: Fetching https://github.com/athena-framework/serializer.git
   I: Fetching https://github.com/athena-framework/spec.git
   I: Fetching https://github.com/athena-framework/validator.git
   I: Fetching https://github.com/crystal-ameba/ameba.git
   I: Fetching https://github.com/athena-framework/spec.git
   E: Failed to clone https://github.com/athena-framework/spec.git: Failed git clone -c core.askPass=true -c init.templateDir= --mirror --quiet -- https://github.com/athena-framework/spec.git /home/runner/.cache/shards/github.com/athena-framework/spec.git.
   fatal: destination path '/home/runner/.cache/shards/github.com/athena-framework/spec.git' already exists and is not an empty directory.

Reproduces on Linux and macOS, but not on Windows. I also cannot reproduce on Linux locally.
Is this a bug in shards? I notice there are two lines Fetching https://github.com/athena-framework/spec.git, maybe shards got into a confused state?

@Blacksmoke16
Copy link
Member

Blacksmoke16 commented Oct 10, 2024

Is this tool intended to run against the lastest released version, or the latest code in master?

EDIT: I bet it's in there twice because it's both a dev and non-dev dependency?

@straight-shoota
Copy link
Member Author

Is this tool intended to run against the lastest released version, or the latest code in master?

It runs against master. That's usually best because in case there are some incompatibilities with the current Crystal master, they might be fixed but not released yet.

@Blacksmoke16
Copy link
Member

Alright, in that case I'd prob just do like SHARDS_OVERRIDE=shard.dev.yml shards install. That'll just symlink everything from src/ into lib/. Which is what I do for Athena CI as well.

@straight-shoota
Copy link
Member Author

That fixed it. Still something is odd in the shard.yml.

And there's a spec failure in spec on Windows.

@Blacksmoke16
Copy link
Member

Still something is odd in the shard.yml.

Is prob because it's both a dev and non-dev dependency?

And there's a spec failure in spec on Windows

I think what's going on here is Athena specs have 2 diff "types" unit and compiled. The latter being responsible for testing things that run via Process.run. In normal Athena CI, the compiled specs only run on ubuntu, because there's not really any platform specific logic that really needs tested.

So I guess to fix this, I could either:

  1. Mark this spec as pending if not on a unix like OS
  2. Have this repo only run compiled specs on linux
  3. Make this spec less specific by just looking at the exception type vs the exact message

3 sounds pretty reasonable, I'll put together a PR and get merged then can re-run that spec.

@straight-shoota
Copy link
Member Author

Still something is odd in the shard.yml.

Is prob because it's both a dev and non-dev dependency?

That shouldn't be an issue.
Also it works locally. So there's definitely something quirky going on.

@Blacksmoke16
Copy link
Member

@straight-shoota This looks good now.

@straight-shoota straight-shoota merged commit 07a1295 into master Oct 11, 2024
6 checks passed
@straight-shoota straight-shoota deleted the feat/test-athena branch October 11, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants