Skip to content

Commit e286cf9

Browse files
authored
Merge pull request #508 from leancloud/github-action
build: github action setup-python upgrade to v2
2 parents e8bde41 + 2558900 commit e286cf9

File tree

2 files changed

+31
-36
lines changed

2 files changed

+31
-36
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,14 @@ on:
1818
- 'doc/**'
1919

2020
jobs:
21-
build:
22-
21+
lint:
2322
runs-on: ubuntu-latest
24-
strategy:
25-
matrix:
26-
python-version: [3.5]
27-
2823
steps:
2924
- uses: actions/checkout@v2
30-
- name: Set up Python ${{ matrix.python-version }}
31-
uses: actions/setup-python@v1
25+
- name: Set up Python
26+
uses: actions/setup-python@v2
3227
with:
33-
python-version: ${{ matrix.python-version }}
28+
python-version: '3.6'
3429
- name: Install dependencies
3530
run: |
3631
python -m pip install --upgrade pip
@@ -42,3 +37,30 @@ jobs:
4237
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
4338
# exit-zero treats all errors as warnings.
4439
flake8 . --count --exit-zero --statistics
40+
41+
test:
42+
runs-on: ubuntu-latest
43+
strategy:
44+
max-parallel: 1
45+
matrix:
46+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Set up Python
50+
uses: actions/setup-python@v2
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
- name: Install dependencies
54+
run: |
55+
python -m pip install --upgrade pip
56+
pip install -r requirements.txt
57+
pip install -e .'[test]'
58+
- name: Run tests with ${{ matrix.python-version }}
59+
env:
60+
APP_ID: 8FfQwpvihLHK4htqmtEvkNrv
61+
APP_KEY: eE9tNOcCiWoMHM1phxY41rAz
62+
MASTER_KEY: 75zAjEJSj7lifKQqKSTryae9
63+
USE_REGION: US
64+
run:
65+
nosetests -v
66+

.travis.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)