xmtp / libxmtp

MIT License
33 stars 13 forks source link

Refactor GH action workflows #874

Closed rygine closed 4 days ago

rygine commented 5 days ago

Summary

For this PR to pass all checks, I'll need to change the required check lint to Lint.

Notes on path filtering

There are only 2 required checks for pull requests: Lint and Test. This refactoring ensures that these steps are run on every PR. Not every file change will result in linting or testing all code. For example, when only the Node bindings have changes, linting and testing will not run on the FFI bindings (and vice-versa). When only non-code changes occur, linting and testing steps are a no-op.

Unfortunately, we must do this song and dance because if a required check doesn't run as a result of path filtering (paths and paths-ignore), GitHub doesn't recognize that the check can be skipped.

Ignored code paths

The following code directories are currently ignored:

Notes on rust tooling

GitHub and Warp action runners come with rust pre-installed. There's no need to use actions to run rustup or cargo.

Naming conventions

With these changes, I'm hoping to establish new naming conventions for our GitHub workflow files. We currently deploy, lint, release, and test our code. So I've prefixed the filenames with those actions followed by what part of the code base it's acting on. There's only 1 exception to this: noop. Hopefully this exception will go away once GitHub is able to allow skipping of required checks when they don't run as a result of path filtering.

Fast follows

There's a very small chance that a deploy or release action doesn't work after these changes. If so, fixing them should be straight-forward.