Skip to content

Commit e3cf0ee

Browse files
committed
Updated Github actions configuration
1 parent a2e286e commit e3cf0ee

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

.github/workflows/python-package.yml

+13-7
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,31 @@ jobs:
1010

1111
runs-on: ubuntu-latest
1212
strategy:
13-
fail-fast: false
13+
fail-fast: true
1414
matrix:
15-
python-version: ["3.x"]
15+
python-version: ["3.11"]
1616

1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
20+
uses: actions/setup-python@v5
2121
with:
2222
python-version: ${{ matrix.python-version }}
2323
cache: 'pip'
24-
cache-dependency-path: '**/setup.py'
24+
cache-dependency-path: '**/setup.cfg'
25+
# This is needed for compiling wxwidgets
2526
- name: Install gtk3
2627
run: |
2728
sudo apt install libgtk-3-dev
2829
- name: Install dependencies
2930
run: |
3031
python -m pip install --upgrade pip setuptools
31-
python -m pip install .[test,dist]
32+
python -m pip install .[dev]
3233
- name: Test with pytest
3334
run: |
34-
pytest -v
35+
pytest --cov=objdictgen --cov-report=xml -p no:logging --tb=no
36+
- name: Upload coverage reports to Codecov
37+
uses: codecov/[email protected]
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
slug: Laerdal/python-objdictgen

.github/workflows/python-publish.yml

+7-12
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,23 @@ jobs:
2020

2121
runs-on: ubuntu-latest
2222
strategy:
23-
fail-fast: false
23+
fail-fast: true
2424
matrix:
2525
python-version: ["3.x"]
2626

2727
steps:
28-
- uses: actions/checkout@v3
29-
- name: Set up Python
30-
uses: actions/setup-python@v4
28+
- uses: actions/checkout@v4
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v5
3131
with:
3232
python-version: ${{ matrix.python-version }}
33-
- name: Install gtk3
34-
run: |
35-
sudo apt install libgtk-3-dev
33+
cache: 'pip'
34+
cache-dependency-path: '**/setup.cfg'
3635
- name: Install dependencies
3736
run: |
38-
python -m pip install --upgrade pip setuptools wheel
37+
python -m pip install --upgrade pip setuptools
3938
python -m pip install build
40-
# - name: Build 2.7 package
41-
# if: ${{ matrix.python-version == '2.7' }}
42-
# run: python -m build --wheel
4339
- name: Build package
44-
if: ${{ matrix.python-version != '2.7' }}
4540
run: python -m build
4641
# - name: Publish package to TestPyPI
4742
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ htmlcov/
99
tmp*/
1010
dist/
1111
.nox
12+
coverage.xml
1213

1314
*.pyc
1415
*.bak

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
88

99
[tool.pytest.ini_options]
1010
minversion = "6.0"
11-
addopts = "-l --tb=native --cov=objdictgen"
11+
addopts = "-l --tb=native"
1212
testpaths = [
1313
"tests",
1414
]

0 commit comments

Comments
 (0)