Skip to content

Commit 683c3e4

Browse files
committed
Update github actions yaml files
1 parent a6daf27 commit 683c3e4

File tree

2 files changed

+52
-32
lines changed

2 files changed

+52
-32
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: Build
22
on:
33
push:
4-
branches: [ main, dev ]
4+
branches: [main, dev]
55
pull_request:
6-
branches: [ main, dev ]
6+
branches: [main, dev]
77
workflow_dispatch:
88
inputs:
99
debug_enabled:
1010
type: boolean
11-
description: Run the build with tmate debugging
11+
description: Debug with tmate
1212
required: false
1313
default: false
1414

@@ -18,13 +18,13 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
21+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.1"]
2222

2323
steps:
2424
- name: Checkout repository
2525
uses: actions/checkout@v3
2626

27-
- name: Fetch complete history for all tags and branches
27+
- name: Fetch all tags and branches
2828
run: git fetch --prune --unshallow
2929

3030
- name: Create ArangoDB Docker container
@@ -41,19 +41,19 @@ jobs:
4141
- name: Start ArangoDB Docker container
4242
run: docker start arango
4343

44-
- name: Set up Python ${{ matrix.python-version }}
44+
- name: Set up Python
4545
uses: actions/setup-python@v4
4646
with:
4747
python-version: ${{ matrix.python-version }}
4848

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

5353
- name: Run pre-commit checks
5454
uses: pre-commit/action@v3.0.0
5555

56-
- name: Install package
56+
- name: Install dependencies
5757
run: pip install .[dev]
5858

5959
- name: Run unit tests
@@ -67,7 +67,7 @@ jobs:
6767

6868
- name: Upload coverage to Codecov
6969
uses: codecov/codecov-action@v3
70-
if: matrix.python-version == '3.8'
70+
if: matrix.python-version == '3.10'
7171
with:
7272
fail_ci_if_error: false
7373
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/pypi.yaml

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

0 commit comments

Comments
 (0)