olmps / memo

Memo is an open-source, programming-oriented spaced repetition software (SRS) written in Flutter.
BSD 3-Clause "New" or "Revised" License
1.83k stars 159 forks source link

Adds collections integrity unit tests #273

Closed ggirotto closed 2 years ago

ggirotto commented 2 years ago

Also adds updated - added resources and made other small adjustments - collections to collections/ folder.

matuella commented 2 years ago

Also, I've already removed the test collection in https://github.com/olmps/memo/pull/276. Will merge both #275 and #276 so you can rebase on that.

ggirotto commented 2 years ago

Will these collections properly run at the same time that the workflow is merged into main?

Like, we're developing in server, then, when merging into main, will the .github/ changes work effectively with the script itself?

Good catch. Updated update-collections workflow to run the integrity tests before running the collections sync.

matuella commented 2 years ago

Good catch. Updated update-collections workflow to run the integrity tests before running the collections sync.

But does it change the fact that all collections are going to be merged before the workflow is available?

ggirotto commented 2 years ago

But does it change the fact that all collections are going to be merged before the workflow is available?

I didn't understood your question. The update-collections is the one who merges the collections in Firestore. If it fails in the tests lane, it doesn't continue with the merging process.

matuella commented 2 years ago

This workflow will only work when changes are pushed to main branch. All collections here in this pull will be available at the same time as the workflow in the main branch, which, in my naive perspective, wouldn't run the sync, as it will only detect such changes, in that particular folder, after it has been available in main.

TLDR: shouldn't we split merging the collections after the server is available in main?

ggirotto commented 2 years ago

Actually I believe they'll be synched, because the workflow runs on every push on main detecting the changes since the last merge commit, which includes all added collections. It'll compare the merge commit in main with b15d97, which is the last commit, and in this difference these added collections will be considered.