mirror of
https://github.com/sprockets/sprockets.mixins.mediatype.git
synced 2024-12-27 20:24:39 +00:00
Add first draft of Github CI pipeline.
This commit is contained in:
parent
77ecc36026
commit
9993a81e51
1 changed files with 53 additions and 0 deletions
53
.github/workflows/testing.yml
vendored
Normal file
53
.github/workflows/testing.yml
vendored
Normal 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
|
Loading…
Reference in a new issue