File tree Expand file tree Collapse file tree 5 files changed +52
-13
lines changed Expand file tree Collapse file tree 5 files changed +52
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : check-semver
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches : [main, dev]
7
+
8
+ jobs :
9
+ check-semver :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v3
14
+ with :
15
+ fetch-depth : 0
16
+ - name : Check diff
17
+ run : |
18
+ SEMVER_CHANGED=$(git diff origin/$GITHUB_BASE_REF...HEAD setup.py | grep "version=")
19
+ if [ -z "$SEMVER_CHANGED" ]; then exit 1; else exit 0; fi
Original file line number Diff line number Diff line change 1
- image : docker:20 .10.14
1
+ image : python:3 .10.2-slim-bullseye
2
2
3
- pre-commit :
4
- image : python:3.10.2-slim-bullseye
5
- before_script :
6
- - apt update && apt install -y --no-install-recommends git
7
- - /usr/local/bin/python -m pip install --upgrade pip
8
- - pip install pre-commit
9
- script :
10
- - pre-commit run --all-files
11
- rules :
12
- - if : $CI_PIPELINE_SOURCE == "merge_request_event"
13
- - if : ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "dev")
3
+ stages :
4
+ - lint
5
+ - build
6
+ - deploy
7
+
8
+ include :
9
+ - local : ' /.gitlab/ci/check-semver.yaml'
Original file line number Diff line number Diff line change
1
+ check-semver :
2
+ stage : lint
3
+ image :
4
+ name : alpine/git
5
+ entrypoint : [""]
6
+ script :
7
+ - git fetch
8
+ - SEMVER_CHANGED=$(git diff $CI_MERGE_REQUEST_DIFF_BASE_SHA...HEAD setup.py | grep "version=")
9
+ - if [ -z "$SEMVER_CHANGED" ]; then exit 1; else exit 0; fi
10
+ rules :
11
+ - if : $CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "dev")
Original file line number Diff line number Diff line change
1
+ image : python:3.10.2-slim-bullseye
2
+
3
+ pre-commit :
4
+ stage : lint
5
+ before_script :
6
+ - apt update && apt install -y --no-install-recommends git
7
+ - /usr/local/bin/python -m pip install --upgrade pip
8
+ - pip install pre-commit
9
+ script :
10
+ - pre-commit run --all-files
11
+ rules :
12
+ - if : $CI_PIPELINE_SOURCE == "merge_request_event"
13
+ - if : ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "dev")
Original file line number Diff line number Diff line change 28
28
29
29
setup (
30
30
name = 'sealgw' ,
31
- version = "0.0.1 " ,
31
+ version = "0.0.2 " ,
32
32
description = 'SealGW: SEmi-Analytical Localization for Gravitational Waves' ,
33
33
author = 'Qian Hu' ,
34
34
You can’t perform that action at this time.
0 commit comments