Skip to content

Commit 2f0767b

Browse files
ci: Update to stable GHA versions (#247)
* Add workflow dispatch triggers to run CI on demand. * Update actions to latest stable versions * Fix CI so that `flake8` and `safety` checks actually run. - In the meantime this was fixed by @talvandaalen in PR #245. 👍 * Report coverage to Codecov for all the Python versions tested by separating uploads with version flags.
1 parent 175e9fd commit 2f0767b

File tree

2 files changed

+34
-33
lines changed

2 files changed

+34
-33
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,32 @@ on:
66
# Run daily at 0:01 UTC
77
schedule:
88
- cron: "1 0 * * *"
9+
workflow_dispatch:
910

1011
jobs:
1112
flake8:
1213
runs-on: ubuntu-latest
1314

1415
steps:
15-
- uses: actions/checkout@master
16+
- uses: actions/checkout@v3
1617
- name: Set up Python
17-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v4
1819
with:
19-
python-version: 3.8
20+
python-version: "3.11"
2021
- name: Install dependencies
2122
env:
2223
servicex_version: 1.0a1
2324
run: |
2425
python -m pip install --upgrade pip setuptools wheel
25-
pip install --no-cache-dir -e .[test]
26-
pip list
26+
python -m pip install --no-cache-dir -e .[test]
27+
python -m pip list
2728
- name: Lint with Flake8
2829
run: |
2930
flake8 --exclude=tests/* --ignore=E501,W503
3031
- name: Check for vulnerable libraries
3132
run: |
32-
pip install safety
33-
pip freeze | safety check
33+
python -m pip install safety
34+
python -m pip freeze | safety check
3435
3536
test:
3637
needs:
@@ -43,29 +44,29 @@ jobs:
4344
runs-on: ${{ matrix.platform }}
4445

4546
steps:
46-
- uses: actions/checkout@master
47+
- uses: actions/checkout@v3
4748
- name: Set up Python ${{ matrix.python-version }}
48-
uses: actions/setup-python@v1
49+
uses: actions/setup-python@v4
4950
with:
5051
python-version: ${{ matrix.python-version }}
5152
- name: Install dependencies
5253
env:
5354
servicex_version: 1.0a1
5455
run: |
5556
python -m pip install --upgrade pip setuptools wheel
56-
pip install --no-cache-dir -e .[test]
57-
pip list
57+
python -m pip install --no-cache-dir -e .[test]
58+
python -m pip list
5859
- name: Test with pytest
5960
run: |
6061
python -m pytest
6162
- name: Code coverage with pytest
62-
if: github.event_name == 'push' && matrix.python-version == 3.7 && matrix.platform == 'ubuntu-latest'
63+
if: github.event_name == 'push' && matrix.platform == 'ubuntu-latest'
6364
run: |
6465
python -m pytest --ignore=setup.py --cov=servicex --cov-report=term-missing --cov-config=.coveragerc --cov-report xml
6566
- name: Report coverage with Codecov
66-
if: github.event_name == 'push' && matrix.python-version == 3.7 && matrix.platform == 'ubuntu-latest'
67-
uses: codecov/codecov-action@v1
67+
if: github.event_name == 'push' && matrix.platform == 'ubuntu-latest'
68+
uses: codecov/codecov-action@v3
6869
with:
6970
token: ${{ secrets.CODECOV_TOKEN }}
7071
file: ./coverage.xml # optional
71-
flags: unittests # optional
72+
flags: unittests-${{ matrix.python-version }} # optional

.github/workflows/pypi.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
13-
- name: Set up Python
14-
uses: actions/setup-python@v2
15-
with:
16-
python-version: 3.7
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip build
20-
- name: Build the servicex wheel
21-
env:
22-
servicex_version: ${{ github.ref }}
23-
run: |
24-
python -m build --sdist --wheel
25-
- name: Publish servicex to PyPI
26-
uses: pypa/gh-action-pypi-publish@v1.3.1
27-
with:
28-
user: __token__
29-
password: ${{ secrets.pypi_password_servicex }}
12+
- uses: actions/checkout@v3
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.10"
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip build
20+
- name: Build the servicex wheel
21+
env:
22+
servicex_version: ${{ github.ref }}
23+
run: |
24+
python -m build --sdist --wheel
25+
- name: Publish servicex to PyPI
26+
uses: pypa/gh-action-pypi-publish@v1.6.4
27+
with:
28+
password: ${{ secrets.pypi_password }}
29+
print_hash: true

0 commit comments

Comments
 (0)