Skip to content
Merged

Badges #1027

Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,24 @@ jobs:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
fetch-depth: 0

- name: Create tag and GitHub release
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "$VERSION" -m "Release $VERSION"
git push origin "$VERSION"
gh release create "$VERSION" --title "$VERSION" --generate-notes

PREV_TAG=$(git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*' "$VERSION^" 2>/dev/null || true)
if [[ -n "$PREV_TAG" && "$(git rev-list --count "$PREV_TAG..$VERSION")" == "1" ]]; then
# Single squash commit since the last release: use its message verbatim
# instead of --generate-notes, which would just restate the same one commit.
NOTES="$(git log -1 --format=%B "$VERSION")"
gh release create "$VERSION" --title "$VERSION" --notes "$NOTES"
else
gh release create "$VERSION" --title "$VERSION" --generate-notes
fi

# A tag pushed by GITHUB_TOKEN does not trigger build-image.yml's push-tags event
# (GitHub suppresses it to avoid recursion), so dispatch the build explicitly.
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Worklfow tests now run in parallel and asserts no new migrations
- Workflow tests now run in parallel and asserts no new migrations

## [3.6.0]

Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Github Actions](https://github.com/cortex-lab/alyx/actions/workflows/main.yml/badge.svg)](https://github.com/cortex-lab/alyx/actions/)
[![Coverage Status](https://coveralls.io/repos/github/cortex-lab/alyx/badge.svg?branch=github_action)](https://coveralls.io/github/cortex-lab/alyx?branch=master)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21513696.svg)](https://doi.org/10.5281/zenodo.21513696)

Database for experimental neuroscience laboratories

Expand Down Expand Up @@ -34,12 +35,18 @@ Contribution checklist:
- [ ] update version number in `./alyx/alyx/__init__.py`
- [ ] update `CHANGELOG.md`

Release process:
1. Open a PR from your feature branch into dev
2. On dev, bump the Alyx version and update the changelog
3. Open a PR from dev to master
4. When CI passes, make a squash commit into master using the version as the commit title, and changelog section as the message
5. Actions will automatically create a new release, deploy containers, and assign a DOI

### Running tests

Continuous integration is set up. But before submitting a PR or commit,the tests can run locally. First install the test dependencies with `pip install -r requirements_test.txt`.
- `./manage.py test -n --parallel` parallel test without migrations (fastest)
- `./manage.py test` test with migrations (recommended if model changes)
- `./manage.py test` test with migrations (recommended if models change)

### Documentation contribution guide

Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ source = alyx
concurrency = multiprocessing
parallel = True
omit =
*/wsgi.py
*/gunicorn_wsgi.py

[coverage:report]
exclude_lines =
Expand Down
Loading