maplibre / maplibre-gl-geocoder

Geocoding for MapLibre
ISC License
53 stars 18 forks source link

Run tests in CI #34

Closed wipfli closed 4 weeks ago

wipfli commented 2 years ago

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 commented 2 years ago

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...

slaymance commented 2 years ago

PR 47

slaymance commented 2 years ago

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
HarelM commented 4 weeks ago

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