-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 1.45 KB
/
linux.yaml
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
35
36
37
38
name: linux-tests
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# Python 3.3 and 3.4 have been removed since github won't provide these anymore
# As of 2023/01/09, we have removed python 3.5 and 3.6 as they don't work anymore with linux on github
# As of 2023/10/06, we have removed python 2.7 fas they don't work anymore with linux on github
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12", 'pypy-3.6', 'pypy-3.7', 'pypy-3.10']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
expiration: 30d
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
if [ -f ofunctions/requirements.txt ]; then pip install -r ofunctions/requirements.txt; fi
- name: Execute tests and generate coverage report
env:
RUNNING_ON_GITHUB_ACTIONS: true
run: |
pip install pytest coverage
# Make sure we don't try the ping checks since they fail on github runners that don't allow pings (WTF !)
# See https://github.com/actions/virtual-environments/issues/1519
python -m coverage run -m pytest -s tests
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3