-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.11 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: ci
on: [push, pull_request, workflow_dispatch]
jobs:
test-and-coverage:
strategy:
matrix:
python-version: ['2.7','3.5','3.12']
container:
image: python:${{ matrix.python-version }}
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v4
- name: Test (Python 2)
if: matrix.python-version == '2.7'
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
python -m pytest --cov
- name: Test (Python 3)
if: matrix.python-version != '2.7'
run: |
sudo apt-get install python3-venv
python3 -m venv venv
venv/bin/python3 -m pip install --upgrade pip
venv/bin/python3 -m pip install pytest pytest-cov
venv/bin/python3 -m pytest --cov
- name: Coveralls
if: matrix.python-version == '3.12'
uses: coverallsapp/github-action@v2