Skip to content

The crates.io installation test event triggers are not optimal #56

@EliahKagan

Description

@EliahKagan

The ci.yml workflow primarily runs when commits are pushed to main, and in pull requests. It does not run on a schedule, nor following publishing.

on:
pull_request:
push:
branches:
- main
- 'run-ci/**'
- '**/run-ci/**'
workflow_dispatch:

This makes total sense for most of what it is used for, and I do not advocate that it be changed. However, it is surprising to test installation from crates.io on these triggers:

installation:
name: Installation
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
rust: ["stable"]
continue-on-error: ${{ matrix.rust != 'stable' }}
runs-on: ${{ matrix.os }}
steps:
- name: "Installation from crates.io: cargo-smart-release"
run: cargo install --debug --force cargo-smart-release

These may not be the best events to run that check on, since opening and updating pull requests, or integrating changes into main (or, more broadly, pushing to any branch) do not change anything that would cause installation from crates.io to stop (or start) working.

As it stands, this does provide value beyond not having such a job. Problems that affect both crates.io installations of the latest published version of cargo-smart-release and the sometimes newer code as it is being worked on this repository will be caught. Very recently, in #55, this caught that installing cargo-smart-release from source without --locked or --frozen is recently broken on Windows, due to vorner/signal-hook#173. (See also GitoxideLabs/gitoxide#1959.)

But I recommend the check be changed to run after publishing, or on a schedule, or both. This can be done easily by moving to a different, possibly newly created, workflow. The question is how and when it should run.

This seems analogous to GitoxideLabs/gitoxide#1553 (which was fixed in GitoxideLabs/gitoxide#1555).

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions