diff --git a/.github/scripts/bump_version.py b/.github/scripts/bump_version.py index e79db12..8da69e2 100644 --- a/.github/scripts/bump_version.py +++ b/.github/scripts/bump_version.py @@ -21,6 +21,10 @@ elif label == "feature": minor += 1 patch = 0 + # Determine every tens of minor version increments (10, 20, 30 etc.) + if (minor % 10) == 0: + # Set patch version to 1 directly + patch = 1 build = 0 elif label == "patch": diff --git a/.github/workflows/VALIDATION.yml b/.github/workflows/VALIDATION.yml index d616558..b84afca 100644 --- a/.github/workflows/VALIDATION.yml +++ b/.github/workflows/VALIDATION.yml @@ -33,7 +33,7 @@ jobs: - name: Delayed execution if: steps.check.outputs.result == 'wait' - run: sleep 30 + run: sleep 120 - name: Check labels uses: actions/github-script@v7 @@ -91,13 +91,26 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Checking PR status + uses: actions/github-script@v7 + with: + script: | + const labels = context.payload.pull_request.labels.map(l => l.name); + + if (labels.includes('build')) { + console.log("PR is labelled 'build', thus no changes in software is imminent. Check is done sucessfully!"); + } + + - name: Setup Micromamba + if: ${{ !contains(github.event.pull_request.labels.*.name, 'build') }} uses: mamba-org/setup-micromamba@v2 with: environment-name: test-env init-shell: bash - name: Test conda installation + if: ${{ !contains(github.event.pull_request.labels.*.name, 'build') }} shell: bash -l {0} run: | micromamba install conda --yes @@ -107,11 +120,13 @@ jobs: pip install . - name: Verify package imports + if: ${{ !contains(github.event.pull_request.labels.*.name, 'build') }} shell: bash -l {0} run: | mmaseq --version - name: Test pipeline + if: ${{ !contains(github.event.pull_request.labels.*.name, 'build') }} shell: bash -l {0} run: | mmadeploy --deploy_dir ~/test --threads 3 --test --verbosity 2