File tree Expand file tree Collapse file tree 22 files changed +415
-86
lines changed
actions/install_requirements Expand file tree Collapse file tree 22 files changed +415
-86
lines changed Original file line number Diff line number Diff line change 1+ name : Install requirements
2+ description : Install a version of python then call pip install and report what was installed
3+ inputs :
4+ python-version :
5+ description : Python version to install, default is from Dockerfile
6+ default : " dev"
7+ pip-install :
8+ description : Parameters to pass to pip install
9+ default : " $([ -f dev-requirements.txt ] && echo '-c dev-requirements.txt') -e .[dev]"
10+
11+ runs :
12+ using : composite
13+ steps :
14+ - name : Get version of python
15+ run : |
16+ PYTHON_VERSION="${{ inputs.python-version }}"
17+ if [ $PYTHON_VERSION == "dev" ]; then
18+ PYTHON_VERSION=$(sed -n "s/ARG PYTHON_VERSION=//p" Dockerfile)
19+ fi
20+ echo "PYTHON_VERSION=$PYTHON_VERSION" >> "$GITHUB_ENV"
21+ shell : bash
22+
23+ - name : Setup python
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : ${{ env.PYTHON_VERSION }}
27+
28+ - name : Install packages
29+ run : pip install ${{ inputs.pip-install }}
30+ shell : bash
31+
32+ - name : Report what was installed
33+ run : pip freeze
34+ shell : bash
Original file line number Diff line number Diff line change 1+ ** JIRA ticket** : [ TICKET-123] ( https://link.to.jira )
2+
3+ ** Summary** :
4+
5+ A brief description of what this pull request aims to achieve
6+
7+ ** Changes** :
8+
9+ - List changes made in this pull request
10+
11+ ** To test** :
12+
13+ - List actions that should be taken to test that functionality works as expected
Original file line number Diff line number Diff line change 1+ on :
2+ workflow_call :
3+ outputs :
4+ branch-pr :
5+ description : The PR number if the branch is in one
6+ value : ${{ jobs.pr.outputs.branch-pr }}
7+
8+ jobs :
9+ pr :
10+ runs-on : " ubuntu-latest"
11+ outputs :
12+ branch-pr : ${{ steps.script.outputs.result }}
13+ steps :
14+ - uses : actions/github-script@v7
15+ id : script
16+ if : github.event_name == 'push'
17+ with :
18+ script : |
19+ const prs = await github.rest.pulls.list({
20+ owner: context.repo.owner,
21+ repo: context.repo.repo,
22+ head: context.repo.owner + ':${{ github.ref_name }}'
23+ })
24+ if (prs.data.length) {
25+ console.log(`::notice ::Skipping CI on branch push as it is already run in PR #${prs.data[0]["number"]}`)
26+ return prs.data[0]["number"]
27+ }
Original file line number Diff line number Diff line change 1+ name : Create and publish a Docker image
2+
3+ on :
4+ workflow_call :
5+
6+ env :
7+ REGISTRY : ghcr.io
8+ IMAGE_NAME : ${{ github.repository }}
9+
10+ jobs :
11+ build-and-push-image :
12+ name : Build and push image
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+ attestations : write
18+ id-token : write
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+ - name : Log in to the Container registry
23+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
24+ with :
25+ registry : ${{ env.REGISTRY }}
26+ username : ${{ github.actor }}
27+ password : ${{ secrets.GITHUB_TOKEN }}
28+ - name : Extract metadata (tags, labels) for Docker
29+ id : meta
30+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
31+ with :
32+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
33+ - name : Build and push Docker image
34+ id : push
35+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
36+ with :
37+ context : .
38+ push : true
39+ tags : ${{ steps.meta.outputs.tags }}
40+ labels : ${{ steps.meta.outputs.labels }}
41+
42+ - name : Generate artifact attestation
43+ uses : actions/attest-build-provenance@v2
44+ with :
45+ subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
46+ subject-digest : ${{ steps.push.outputs.digest }}
47+ push-to-registry : true
Original file line number Diff line number Diff line change 1+ name : Integration Tests
2+
3+ on :
4+ workflow_call :
5+ secrets :
6+ CODECOV_TOKEN :
7+ required : true
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ services :
13+ integration-db :
14+ image : ghcr.io/diamondlightsource/scaup-backend-db:master
15+ ports :
16+ - 5432:5432
17+ strategy :
18+ matrix :
19+ python-version : ["3.12", "3.13"]
20+ steps :
21+ - uses : actions/checkout@v3
22+ - name : Set up Python ${{ matrix.python-version }}
23+ uses : actions/setup-python@v4
24+ with :
25+ python-version : ${{ matrix.python-version }}
26+ - name : Install dependencies
27+ run : |
28+ python -m pip install --upgrade pip
29+ pip install .[dev]
30+ - name : Test with pytest
31+ env :
32+ CONFIG_PATH : /home/runner/work/scaup-backend/scaup-backend/config.json
33+ run : |
34+ tox -e pytest
35+ - name : Upload coverage to Codecov
36+ uses : codecov/codecov-action@v5
37+ with :
38+ name : ${{ inputs.python-version }}/${{ inputs.runs-on }}
39+ files : cov.xml
40+ env :
41+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change 1+ on :
2+ workflow_call :
3+ inputs :
4+ tox :
5+ type : string
6+ description : What to run under tox
7+ required : true
8+
9+ jobs :
10+ run :
11+ runs-on : " ubuntu-latest"
12+
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
16+
17+ - name : Install python packages
18+ uses : ./.github/actions/install_requirements
19+
20+ - name : Run tox
21+ run : tox -e ${{ inputs.tox }}
Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ jobs :
8+ check :
9+ uses : ./.github/workflows/_check.yml
10+
11+ lint :
12+ needs : check
13+ if : needs.check.outputs.branch-pr == ''
14+ uses : ./.github/workflows/_tox.yml
15+ with :
16+ tox : pre-commit
17+
18+ test :
19+ needs : check
20+ if : needs.check.outputs.branch-pr == ''
21+ uses : ./.github/workflows/_integration.yml
22+ secrets :
23+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
24+
25+ release :
26+ if : github.ref_type == 'tag'
27+ needs : test
28+ uses : ./.github/workflows/_dist.yml
29+ permissions :
30+ contents : read
31+ packages : write
32+ attestations : write
33+ id-token : write
Original file line number Diff line number Diff line change 1+ name : Create database Docker image
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ environment :
7+ type : string
8+ default : DEV
9+ required : true
10+ push :
11+ paths :
12+ - " database/**"
13+ branches : ["master"]
14+
15+ env :
16+ REGISTRY : ghcr.io
17+ IMAGE_NAME : ${{ github.repository }}
18+
19+ jobs :
20+ build-and-push-image :
21+ runs-on : ubuntu-latest
22+ permissions :
23+ contents : read
24+ packages : write
25+
26+ steps :
27+ - name : Checkout repository
28+ uses : actions/checkout@v3
29+
30+ - name : Log in to the Container registry
31+ uses : docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
32+ with :
33+ registry : ${{ env.REGISTRY }}
34+ username : ${{ github.actor }}
35+ password : ${{ secrets.GITHUB_TOKEN }}
36+
37+ - name : Extract metadata (tags, labels) for Docker
38+ id : meta
39+ uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
40+ with :
41+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-db
42+
43+ - name : Build and push Docker image
44+ uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
45+ with :
46+ context : database
47+ push : true
48+ tags : ${{ steps.meta.outputs.tags }}
49+ labels : ${{ steps.meta.outputs.labels }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,6 +7,20 @@ All notable changes to this project will be documented in this file.
77The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
88and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99
10+ +++++++++
11+ v0.9.2 (11/04/2025)
12+ +++++++++
13+
14+ **Changed **
15+
16+ - Allow users to push unassigned samples
17+ - Improve logic for ordinal suffixes on samples
18+ - Display more information in tracking labels
19+
20+ **Fixed **
21+
22+ - More accurately pair up samples from Expeye with samples in SCAUP database
23+
1024+++++++++
1125v0.9.1 (26/02/2025)
1226+++++++++
You can’t perform that action at this time.
0 commit comments