Skip to content

Run actions on PRs. #27

Run actions on PRs.

Run actions on PRs. #27

Workflow file for this run

name: Run Linting and Tests
on: [push, pull_request]
concurrency: # cancels prior builds on new commit
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel
python -m pip install .
python -m pip install -r testing_reqs.txt
- name: Lint with black
run: |
python3 -m black -S -l 80 --check .
- name: Test with pytest
run: |
python3 -m pytest ./ngshare_exchange/ --cov=./ngshare_exchange/ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: false
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
verbose: true