Skip to content

Commit b932ab3

Browse files
committed
Update github actions yaml files (#239)
1 parent 09f02f9 commit b932ab3

File tree

3 files changed

+67
-44
lines changed

3 files changed

+67
-44
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
name: Build
2+
23
on:
3-
push:
4-
branches: [ main, dev ]
54
pull_request:
6-
branches: [ main, dev ]
5+
branches: [main, dev]
76
workflow_dispatch:
87
inputs:
98
debug_enabled:
109
type: boolean
11-
description: Run the build with tmate debugging
10+
description: Debug with tmate
1211
required: false
1312
default: false
1413

@@ -18,13 +17,13 @@ jobs:
1817

1918
strategy:
2019
matrix:
21-
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
20+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.1"]
2221

2322
steps:
2423
- name: Checkout repository
2524
uses: actions/checkout@v3
2625

27-
- name: Fetch complete history for all tags and branches
26+
- name: Fetch all tags and branches
2827
run: git fetch --prune --unshallow
2928

3029
- name: Create ArangoDB Docker container
@@ -41,19 +40,19 @@ jobs:
4140
- name: Start ArangoDB Docker container
4241
run: docker start arango
4342

44-
- name: Set up Python ${{ matrix.python-version }}
43+
- name: Set up Python
4544
uses: actions/setup-python@v4
4645
with:
4746
python-version: ${{ matrix.python-version }}
4847

49-
- name: Start tmate session
48+
- name: Debug with tmate
5049
uses: mxschmitt/action-tmate@v3
5150
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
5251

5352
- name: Run pre-commit checks
5453
uses: pre-commit/action@v3.0.0
5554

56-
- name: Install package
55+
- name: Install dependencies
5756
run: pip install .[dev]
5857

5958
- name: Run unit tests
@@ -67,7 +66,7 @@ jobs:
6766

6867
- name: Upload coverage to Codecov
6968
uses: codecov/codecov-action@v3
70-
if: matrix.python-version == '3.8'
69+
if: matrix.python-version == '3.10'
7170
with:
7271
fail_ci_if_error: false
7372
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/codeql.yaml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
name: CodeQL
2+
23
on:
3-
push:
4-
branches: [ main, dev ]
54
pull_request:
6-
branches: [ main, dev ]
5+
branches: [main, dev]
76
schedule:
87
- cron: '21 2 * * 3'
98

109
jobs:
1110
analyze:
1211
name: Analyze
1312
runs-on: ubuntu-latest
13+
14+
permissions:
15+
security-events: write
16+
1417
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v2
17-
- name: Initialize CodeQL
18-
uses: github/codeql-action/init@v1
19-
with:
20-
languages: 'python'
21-
- name: Perform CodeQL Analysis
22-
uses: github/codeql-action/analyze@v1
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
21+
- name: Initialize CodeQL
22+
uses: github/codeql-action/init@v2
23+
24+
- name: Perform CodeQL Analysis
25+
uses: github/codeql-action/analyze@v2

.github/workflows/pypi.yaml

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,52 @@
11
name: Upload to PyPI
2+
23
on:
34
release:
45
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
debug_enabled:
9+
type: boolean
10+
description: Debug with tmate
11+
required: false
12+
default: false
13+
514
jobs:
615
upload:
716
runs-on: ubuntu-latest
17+
818
steps:
9-
- uses: actions/checkout@v2
10-
- name: Fetch complete history for all tags and branches
11-
run: git fetch --prune --unshallow
12-
- name: Set up Python
13-
uses: actions/setup-python@v2
14-
with:
15-
python-version: '3.x'
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine setuptools-scm[toml]
20-
- name: Build distribution
21-
run: python setup.py sdist bdist_wheel
22-
- name: Publish to PyPI Test
23-
env:
24-
TWINE_USERNAME: __token__
25-
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
26-
run: twine upload --repository testpypi dist/*
27-
- name: Publish to PyPI
28-
env:
29-
TWINE_USERNAME: __token__
30-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
31-
run: twine upload --repository pypi dist/*
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
22+
- name: Fetch all tags and branches
23+
run: git fetch --prune --unshallow
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v4
27+
with:
28+
python-version: "3.10"
29+
30+
- name: Debug with tmate
31+
uses: mxschmitt/action-tmate@v3
32+
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
33+
34+
- name: Install dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install setuptools wheel twine setuptools-scm[toml]
38+
39+
- name: Build distribution
40+
run: python setup.py sdist bdist_wheel
41+
42+
- name: Publish to PyPI Test
43+
env:
44+
TWINE_USERNAME: __token__
45+
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
46+
run: twine upload --repository testpypi dist/*
47+
48+
- name: Publish to PyPI
49+
env:
50+
TWINE_USERNAME: __token__
51+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
52+
run: twine upload --repository pypi dist/*

0 commit comments

Comments
 (0)