bumblebee-status/.github/workflows/autotest.yml

46 lines
1.5 KiB
YAML
Raw Normal View History

2022-07-29 14:05:15 +02:00
name: Tests
on:
pull_request:
types: [ opened, reopened, edited ]
push:
env:
CC_TEST_REPORTER_ID: 40cb00907f7a10e04868e856570bb997ab9c42fd3b63d980f2b2269433195fdf
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
2023-07-17 12:36:32 +02:00
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Ubuntu dependencies
run: sudo apt-get install -y libdbus-1-dev libgit2-dev libvirt-dev taskwarrior
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -U coverage pytest pytest-mock freezegun
pip install 'pygit2<1' 'libvirt-python<6.3' 'feedparser<6' 'power<1.4' || true
pip install $(cat requirements/modules/*.txt | cut -d ' ' -f 1 | sort -u)
- name: Install Code Climate dependency
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run tests
run: |
coverage run --source=. -m pytest tests -v
- name: Report coverage
2022-11-26 12:09:04 +01:00
uses: paambaati/codeclimate-action@v3.2.0
with:
2022-07-29 13:35:58 +02:00
coverageCommand: coverage3 xml
debug: true