Skip to content

Windows GHA CI green on invalid opam file #29513

@jmid

Description

@jmid

Spotted on #29486:

When encountering an invalid opam file, the Windows GHA workflows print a warning as expected,
but still complete with a green light.

https://github.com/ocaml/opam-repository/actions/runs/22796601588/job/66132129043?pr=29486

Run $failed = $false

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[default] synchronised from file://D:/a/opam-repository/opam-repository
Warning:  Could not read file D:\opamroot\repo\default\packages\biotk\biotk.0.4\opam. skipping:
          At D:\opamroot\repo\default\packages\biotk\biotk.0.4\opam:24:13-24:14::
          '.' is not a valid token
Now run 'opam upgrade' to apply any package updates.
Testing biotk.0.4
  [ERROR] Package biotk has no version 0.4.
biotk.0.4 is not installable. Skip.

I think we just need to check the exit code of the opam update too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions