Skip to content

Commit 9587f87

Browse files
authored
CM-24003 - Integrate Cimon (#121)
1 parent d4e0152 commit 9587f87

File tree

5 files changed

+96
-44
lines changed

5 files changed

+96
-44
lines changed

.github/workflows/build_executable.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ jobs:
1919
shell: bash
2020

2121
steps:
22+
- name: Run Cimon
23+
if: matrix.os == 'ubuntu-20.04'
24+
uses: cycodelabs/cimon-action@v0
25+
with:
26+
client-id: ${{ secrets.CIMON_CLIENT_ID }}
27+
secret: ${{ secrets.CIMON_SECRET }}
28+
2229
- name: Checkout repository
2330
uses: actions/checkout@v3
2431
with:

.github/workflows/pre_release.yml

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,51 @@ jobs:
1414
id-token: write
1515

1616
steps:
17-
- name: Checkout repository
18-
uses: actions/checkout@v3
19-
with:
20-
fetch-depth: 0
21-
22-
- name: Set up Python 3.7
23-
uses: actions/setup-python@v4
24-
with:
25-
python-version: '3.7'
26-
27-
- name: Install Poetry
28-
run: curl -sSL https://install.python-poetry.org | python - -y
29-
30-
- name: Update PATH
31-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
32-
33-
- name: Install Poetry Plugin
34-
run: poetry self add "poetry-dynamic-versioning[plugin]"
35-
36-
- name: Check Pre-Release Version
37-
id: check-version
38-
run: |
39-
echo "::debug::Package version: $(poetry version --short)"
40-
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT
41-
42-
- name: Exit if not Pre-Release Version
43-
if: steps.check-version.outputs.prerelease != 'true'
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
run: |
47-
gh run cancel ${{ github.run_id }}
48-
gh run watch ${{ github.run_id }}
49-
50-
- name: Build package
51-
run: poetry build
52-
53-
- name: Publish a Python distribution to PyPI
54-
uses: pypa/gh-action-pypi-publish@release/v1
17+
- name: Run Cimon
18+
uses: cycodelabs/cimon-action@v0
19+
with:
20+
client-id: ${{ secrets.CIMON_CLIENT_ID }}
21+
secret: ${{ secrets.CIMON_SECRET }}
22+
prevent: true
23+
fail-on-error: true
24+
allowed-hosts: >
25+
files.pythonhosted.org
26+
install.python-poetry.org
27+
pypi.org
28+
upload.pypi.org
29+
30+
- name: Checkout repository
31+
uses: actions/checkout@v3
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Set up Python 3.7
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: '3.7'
39+
40+
- name: Setup Poetry
41+
uses: snok/install-poetry@v1
42+
43+
- name: Install Poetry Plugin
44+
run: poetry self add "poetry-dynamic-versioning[plugin]"
45+
46+
- name: Check Pre-Release Version
47+
id: check-version
48+
run: |
49+
echo "::debug::Package version: $(poetry version --short)"
50+
[[ "$(poetry version --short)" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo prerelease=true >> $GITHUB_OUTPUT
51+
52+
- name: Exit if not Pre-Release Version
53+
if: steps.check-version.outputs.prerelease != 'true'
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
run: |
57+
gh run cancel ${{ github.run_id }}
58+
gh run watch ${{ github.run_id }}
59+
60+
- name: Build package
61+
run: poetry build
62+
63+
- name: Publish a Python distribution to PyPI
64+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/release.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build and Publish release
22

33
on:
44
release:
5-
types: [created]
5+
types: [ created ]
66

77
jobs:
88
release:
@@ -13,6 +13,19 @@ jobs:
1313
id-token: write
1414

1515
steps:
16+
- name: Run Cimon
17+
uses: cycodelabs/cimon-action@v0
18+
with:
19+
client-id: ${{ secrets.CIMON_CLIENT_ID }}
20+
secret: ${{ secrets.CIMON_SECRET }}
21+
prevent: true
22+
fail-on-error: true
23+
allowed-hosts: >
24+
files.pythonhosted.org
25+
install.python-poetry.org
26+
pypi.org
27+
upload.pypi.org
28+
1629
- name: Checkout repository
1730
uses: actions/checkout@v3
1831
with:
@@ -23,11 +36,8 @@ jobs:
2336
with:
2437
python-version: '3.7'
2538

26-
- name: Install Poetry
27-
run: curl -sSL https://install.python-poetry.org | python - -y
28-
29-
- name: Update PATH
30-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
39+
- name: Setup Poetry
40+
uses: snok/install-poetry@v1
3141

3242
- name: Install Poetry Plugin
3343
run: poetry self add "poetry-dynamic-versioning[plugin]"

.github/workflows/tests.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13+
- name: Run Cimon
14+
uses: cycodelabs/cimon-action@v0
15+
with:
16+
client-id: ${{ secrets.CIMON_CLIENT_ID }}
17+
secret: ${{ secrets.CIMON_SECRET }}
18+
prevent: true
19+
fail-on-error: true
20+
allowed-hosts: >
21+
files.pythonhosted.org
22+
install.python-poetry.org
23+
pypi.org
24+
1325
- name: Checkout repository
1426
uses: actions/checkout@v3
1527

.github/workflows/tests_full.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ jobs:
2222
shell: bash
2323

2424
steps:
25+
- name: Run Cimon
26+
if: matrix.os == 'ubuntu-latest'
27+
uses: cycodelabs/cimon-action@v0
28+
with:
29+
client-id: ${{ secrets.CIMON_CLIENT_ID }}
30+
secret: ${{ secrets.CIMON_SECRET }}
31+
prevent: true
32+
fail-on-error: true
33+
allowed-hosts: >
34+
files.pythonhosted.org
35+
install.python-poetry.org
36+
pypi.org
37+
2538
- name: Checkout repository
2639
uses: actions/checkout@v3
2740

0 commit comments

Comments
 (0)