maplibre-gl-geocoder icon indicating copy to clipboard operation
maplibre-gl-geocoder copied to clipboard

Run tests in CI

Open wipfli opened this issue 3 years ago • 3 comments

Currently we don't run any tests in CI:

https://github.com/maplibre/maplibre-gl-geocoder/blob/cf3de577a3f0acc34da9e421e1b0e00afe330a58/.github/workflows/publish.yml#L23-L31

In the current situation, we might end up publishing something broken. I would recommend to run the tests right before npm publish and create a separate github actions workflow which runs the tests against all pull requests.

wipfli avatar Feb 10 '22 22:02 wipfli

Running the tests in CI will also help managing dependabot pull requests. In GL JS we have the policy that we merge patch bumps if CI passes...

wipfli avatar Feb 11 '22 21:02 wipfli

PR 47

slaymance avatar Mar 17 '22 16:03 slaymance

While we're improving our CI, we can explore some additional ideas for CI.

  1. We can run our test workflow on pull request to main
  2. test workflow runs automatically for pull requests authored by write-access contributors
  3. test workflow can run on PRs by other contributors by adding a run-tests label (action can also clean up this label)
  4. Merging to main is blocked if test workflow fails
  5. publish workflow only runs if test workflow completes successfully
  6. We can set up concurrency for test workflow so only one job is run at a time for a pull request

slaymance avatar Mar 17 '22 16:03 slaymance

Tests are running as part of the CI, if there's anything else, feel free to open a different issue.

HarelM avatar Aug 14 '24 09:08 HarelM