Add first draft of Github CI pipeline.

This commit is contained in:
Dave Shawley 2021-09-12 09:43:28 -04:00 committed by Dave Shawley
parent 77ecc36026
commit 9993a81e51
No known key found for this signature in database
GPG key ID: F41A8A99298F8EED

53
.github/workflows/testing.yml vendored Normal file
View file

@ -0,0 +1,53 @@
name: Run tests
on:
push:
branches: ["*"]
tags-ignore: ["*"]
pull_request:
branches: ["*"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requires/lint.txt
- name: Flake8
run: |
flake8 sprockets tests.py
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requires/testing.txt .
- name: Run tests
run: |
coverage run -m unittest tests.py
coverage report
coverage xml -o ./coverage.xml
- name: Send coverage data to codecov.io
uses: codecov/codecov-action@v1.3.2
if: github.event_name == 'push'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true