This commit is contained in:
Klemek
2021-04-08 22:56:20 +02:00
parent 9fc1bc0b57
commit 990853110b
+10 -3
View File
@@ -3,7 +3,7 @@ name: Test
on: ["push", "pull_request"] on: ["push", "pull_request"]
jobs: jobs:
syntax: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
@@ -17,8 +17,15 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
python -m pip install flake8 pytest black coveralls python -m pip install flake8 pytest black coveralls pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
syntax:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
@@ -36,7 +43,7 @@ jobs:
python-version: [3.7, 3.8, 3.9] python-version: [3.7, 3.8, 3.9]
steps: steps:
- name: Test - name: Test
run: coverage run --source=miniscord -m pytest tests/ run: pytest --cov=miniscord tests/
- name: Upload coverage data to coveralls.io - name: Upload coverage data to coveralls.io
run: coveralls run: coveralls
env: env: