-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to a weekly release scheme #538
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
There are a few ways to go around this: we could for example add a personal token to be used in CI instead. |
Since this auto-releases to npm (which is great!), can we also change the README to tell people to install effekt via the npm registry? |
It's severely untested now (the CI never ran!), but if everything goes well, then we can change the README in a few weeks (once we're confident in the release process). The installer in the VSCode plugin effekt-lang/effekt-vscode#20 is also relying on By the way, we'll need to add the NPM secrets to the repository. |
I'm testing this CI in https://github.com/jiribenes/effekt-ci-test (except for the NPM part for now). I'll log my observations here:
|
✨ what fun ✨ |
A controversial question: does the CI that deploys also need to run (all) the tests again? |
Au contraire, I think it's the only CI that actually really *does* have to pass all the tests. I understand what you mean, technically not as long as we maintain the invariant that everything on the main branch went through a successful PR. But we have been known to merge PRs without CI finishing or commit directly, both of which resulted in failing test on the main branch. I'd keep it so that we watch for flaky tests and similar "oops, failing EDIT: The version currently here & in my test repo does not run tests. |
It's been a month and yet two problems remain:
I think the correct way to proceed is:
WDYT? |
I think moving the tests to the ci that creates the version makes sense. Can we automatically rerun the tests a second time? If they still fail it would be good to be notified and abort the release. |
662f53f
to
93e124c
Compare
I've moved the tests to |
.github/workflows/autorelease.yml
Outdated
- name: Run tests with retry | ||
uses: nick-fields/retry@v3 | ||
with: | ||
timeout_minutes: 120 # NOTE: This needs _some_ value. As of writing this, 2 hours should be future-proof. :) | ||
max_attempts: 3 | ||
retry_on: error | ||
run: sbt clean test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't want to depend on an external action, we could also add something like the following:
- name: Run tests (Attempt 1)
id: test_attempt_1
continue-on-error: true
run: sbt clean test
- name: Run tests (Attempt 2)
id: test_attempt_2
if: steps.test_attempt_1.outcome == 'failure'
continue-on-error: true
run: sbt clean test
- name: Run tests (Attempt 3)
id: test_attempt_3
if: steps.test_attempt_2.outcome == 'failure'
run: sbt clean test
This PR should now be completely ready for review / discussion. I've modified the PR description to reflect the current state and what the autorelease & deploy CI actually do. |
Resolves #533
Was extensively tested in
jiribenes/effekt-ci-test
Description
[
autorelease.yml
] Every Monday at 03:00 UTC (= 05:00 Berlin time as of writing this) or on click [workflow-dispatch], the following happens:run-tests
]X.Y.Z
=>X.{Y + 1}.0
), [calculate-version-and-tag
]sbt
,npm
, andmvn
files, [calculate-version-and-tag
]calculate-version-and-tag
][
deploy.yml
] Whenever a git tag starting withv
gets pushed or whenautorelease.yml
succeeds:build-jar
]build-jar
]build-jar
]release
]release
]publish-npm
]Current version format:
X.Y.Z
Y
so the resulting version isX.{Y + 1}.0
:)Caveats/Wishlist (of the current draft)
M.YY.WW.N
whereN
is zero by default for automatically released versions and nonzero for manual hot-fixes / patches?v0.2.2
. However, we'll still know which git commit the version is from as GitHub Releases remembers the commit.I think there is a way to tell GitHub to make a version tag automatically, but I don't see how right now.EDIT: The bigger problem is: how do we ensure that a git tag push doesn't trigger this again. If one CI event can react to another, then it might be easier to automatically push a tag, and only then do the release the same way as it was -- this would simplify things a lot!npm
as well.It would be really useful forEDIT: We'll see if we can manage without it.jiribenes/effekt-nix
to provide a sha256 hash for each released.tgz
archive.