Skip to content

Commit 8a71ade

Browse files
authored
Update python-package.yml
1 parent 1be4016 commit 8a71ade

1 file changed

Lines changed: 24 additions & 39 deletions

File tree

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,31 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3-
4-
name: Test Python package
5-
6-
on:
7-
push:
8-
branches: [ main ]
9-
pull_request:
10-
branches: [ main ]
11-
121
jobs:
132
build:
14-
runs-on: ubuntu-latest
3+
runs-on: ubuntu-22.04
154
strategy:
165
matrix:
176
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
187

198
steps:
20-
- uses: actions/checkout@v4
21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v5
23-
with:
24-
python-version: ${{ matrix.python-version }}
25-
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
python -m pip install flake8 pytest
30-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31-
32-
- name: Lint with flake8
33-
run: |
34-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
35-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36-
37-
- name: Test with pytest
38-
run: |
39-
python -m pytest --cov=sheet2dict -v tests/ --disable-warnings
40-
41-
- name: CodeCov
42-
run: bash <(curl -s https://codecov.io/bash)
43-
44-
45-
- name: CodeCov
46-
run: bash <(curl -s https://codecov.io/bash)
9+
- uses: actions/checkout@v4
10+
- name: Set up Python ${{ matrix.python-version }}
11+
uses: actions/setup-python@v5
12+
with:
13+
python-version: ${{ matrix.python-version }}
14+
15+
- name: Install dependencies
16+
run: |
17+
python -m pip install --upgrade pip
18+
python -m pip install flake8 pytest
19+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
20+
21+
- name: Lint with flake8
22+
run: |
23+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
24+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
25+
26+
- name: Test with pytest
27+
run: |
28+
python -m pytest --cov=sheet2dict -v tests/ --disable-warnings
29+
30+
- name: CodeCov
31+
run: bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)